úÎ( 'Žnon-portable -- posix only provisionalDon Stewart <dons@galois.com>None.Create a bytestring from a memory mapped Ptr. B A finalizer will be associated with the resource, that will call H munmap when the storage manager detects that the resource is no longer  in use. non-portable -- posix only provisionalDon Stewart <dons@galois.com>NoneThe / function maps a file or device into memory as D a lazy ByteString, made of 64*pagesize unmappable chunks of bytes. @Memory mapped files will behave as if they were read lazily -- ; pages from the file will be loaded into memory on demand. AThe storage manager is used to free chunks that go out of scope, D and unlike strict bytestrings, memory mapped lazy ByteStrings will C be deallocated in chunks (so you can write traversals that run in  constant space). FHowever, the size of the mmapped resource is not known by the Haskell @ GC, it appears only as a small ForeignPtr. This means that the + Haskell GC may not not run as often as you'd like, leading to delays  in unmapping chunks. DAppropriate use of performGC or finalizerForeignPtr may be required @ to ensure deallocation, as resources allocated by mmap are not + tracked by the Haskell garbage collector. EFor example, when writing out a lazy bytestring allocated with mmap, H you may wish to finalizeForeignPtr when each chunk is written, as the G chunk goes out of scope, rather than relying on the garbage collector  to notice the chunk has gone. AThis operation is unsafe: if the file is written to by any other  process on the system, the  contents will change in  Haskell. non-portable -- posix only provisionalDon Stewart <dons@galois.com>NoneThe - function maps a file or device into memory,  returning a strict  that accesses the mapped file. 8 If the mmap fails for some reason, an error is thrown. @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 G the garbage collector notices there are no further references to the D mapped memory, a call to munmap is made. It is not necessary to do D this yourself. In tight memory situations, it may be profitable to  use  performGC or finalizeForeignPtr to force an unmap. =Note: this operation may break referential transparency! If D any other process on the system changes the file when it is mapped $ into Haskell, the contents of your  will change.        bytestring-mmap-0.2.2System.IO.Posix.MMap.InternalSystem.IO.Posix.MMap.LazySystem.IO.Posix.MMapc_munmapc_mmapunsafePackMMapPtrunsafeMMapFilebytestring-0.10.0.2Data.ByteString.Lazy.Internal ByteStringpagesizechunksData.ByteString.Internal