|Portability||non-portable -- posix only|
|Maintainer||Don Stewart <email@example.com>|
mmap a file or device into memory as a strict ByteString.
Memory mapped files
Memory mapped files will behave as if they were read lazily -- pages from the file will be loaded into memory on demand.
The storage manager is used to free the mapped memory. When
the garbage collector notices there are no further references to the
mapped memory, a call to munmap is made. It is not necessary to do
this yourself. In tight memory situations, it may be profitable to
finalizeForeignPtr to force an unmap.
Note: this operation may break referential transparency! If
any other process on the system changes the file when it is mapped
into Haskell, the contents of your
ByteString will change.