Hoogle Search
Within LTS Haskell 24.45 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
Memory mapped files for POSIX and Windows This library provides a wrapper to mmap(2) or MapViewOfFile, allowing files or devices to be lazily loaded into memory as strict or lazy ByteStrings, ForeignPtrs or plain Ptrs, using the virtual memory subsystem to do on-demand loading. Modifications are also supported.
-
This library provides a wrapper to mmap(2) or MapViewOfFile, allowing files or devices to be lazily loaded into memory as strict or lazy ByteStrings, ForeignPtrs or plain Ptrs, using the virtual memory subsystem to do on-demand loading. Modifications are also supported.
mmapFileByteString :: FilePath -> Maybe (Int64, Int) -> IO ByteStringmmap System.IO.MMap Maps region of file and returns it as ByteString. File is mapped in in ReadOnly mode. See mmapFilePtr for details.
mmapFileByteStringLazy :: FilePath -> Maybe (Int64, Int64) -> IO ByteStringmmap System.IO.MMap Maps region of file and returns it as ByteString. File is mapped in in ReadOnly mode. See mmapFileForeignPtrLazy for details.
mmapFileForeignPtr :: FilePath -> Mode -> Maybe (Int64, Int) -> IO (ForeignPtr a, Int, Int)mmap System.IO.MMap Maps region of file and returns it as ForeignPtr. See mmapFilePtr for details.
mmapFileForeignPtrLazy :: FilePath -> Mode -> Maybe (Int64, Int64) -> IO [(ForeignPtr a, Int, Int)]mmap System.IO.MMap The mmapFileForeignPtrLazy function maps a file or device into memory, returning a list of tuples with the same meaning as in function mmapFileForeignPtr. Chunks are really mapped into memory at the first inspection of a chunk. They are kept in memory while they are referenced, garbage collector takes care of the later.
mmapFilePtr :: FilePath -> Mode -> Maybe (Int64, Int) -> IO (Ptr a, Int, Int, Int)mmap System.IO.MMap The mmapFilePtr function maps a file or device into memory, returning a tuple (ptr,rawsize,offset,size) where:
- ptr is pointer to mmapped region
- rawsize is length (in bytes) of mapped data, rawsize might be greater than size because of alignment
- offset tell where your data lives: plusPtr ptr offset
- size your data length (in bytes)
mmapWithFilePtr :: FilePath -> Mode -> Maybe (Int64, Int) -> ((Ptr (), Int) -> IO a) -> IO ammap System.IO.MMap Memory map region of file using autounmap semantics. See mmapFilePtr for description of parameters. The action will be executed with tuple (ptr,size) as single argument. This is the pointer to mapped data already adjusted and size of requested region. Return value is that of action.
munmapFilePtr :: Ptr a -> Int -> IO ()mmap System.IO.MMap Unmaps memory region. As parameters use values marked as ptr and rawsize in description of mmapFilePtr.
-
monad-logger-aeson Control.Monad.Logger.Aeson.Internal A map from JSON key type Key to v.