Copyright | (c) Galois Inc. 2007 |
---|---|
License | BSD3 |
Maintainer | Don Stewart <dons@galois.com> |
Stability | provisional |
Portability | non-portable -- posix only |
Safe Haskell | None |
Language | Haskell98 |
System.IO.Posix.MMap.Internal
Description
Low level mmap access.
Synopsis
- unsafePackMMapPtr :: Ptr Word8 -> CSize -> IO ByteString
- c_mmap :: CSize -> CInt -> IO (Ptr Word8)
- c_munmap :: Ptr Word8 -> CSize -> IO CInt
Converting an mmapped pointer to a ByteString
unsafePackMMapPtr :: Ptr Word8 -> CSize -> IO ByteString Source #
Create a bytestring from a memory mapped Ptr. A finalizer will be associated with the resource, that will call munmap when the storage manager detects that the resource is no longer in use.