bytestring-mmap-0.2.2: mmap support for strict ByteStrings
Copyright(c) Galois Inc. 2007
LicenseBSD3
MaintainerDon Stewart <dons@galois.com>
Stabilityprovisional
Portabilitynon-portable -- posix only
Safe HaskellNone
LanguageHaskell98

System.IO.Posix.MMap.Internal

Description

Low level mmap access.

Synopsis

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.

Low level bindings

c_mmap :: CSize -> CInt -> IO (Ptr Word8) Source #

c_munmap :: Ptr Word8 -> CSize -> IO CInt Source #