Quoth [EMAIL PROTECTED] (Donald Bruce Stewart):
...
| In fact, the (commented out code) for mmapFile :: FilePath -> IO ByteString
| is in Data.ByteString now. You can also provide munmap as the finaliser,
| and let the GC take care of that.
It does make more sense to unmap the string when it's the whole file,
of course, and I assume it would force the OS to free the memory, if
it makes any difference.
Is there any cost to GC that can be avoided if there's no finalizer?
I mean, in the present case you might generate many thousands of substrings
during analysis of the file, so in theory there's a lot less book-keeping
needed if there's nothing to do in the end anyway.
Donn Cave, [EMAIL PROTECTED]
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe