haskus-system-0.6.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.Arch.Linux.Memory

Synopsis

Documentation

sysBrk :: MonadIO m => Word64 -> m Word64 Source #

Set program break location (i.e. data segement size)

On failure, Linux returns the current value. Failures include a value inferior to the end of the data segment, mmaped regions already existing in the region we allocate, etc. On success, the returned value is the new program break address (i.e. the given parameter).

sysBrkGet :: MonadIO m => m Word64 Source #

Return current program break We call sysBrk with an invalid value

sysBrkSet :: MonadIO m => Word64 -> m Bool Source #

Try to set program break and returns True on success

sysMemMap :: MonadIO m => Maybe (Ptr ()) -> Word64 -> MemProtectFlags -> MapFlags -> Maybe Word8 -> Maybe (Handle, Word64) -> Flow m '[Ptr (), ErrorCode] Source #

Map files or devices into memory

Optional hugepagesize is in Log2 and on 6 bits

sysMemUnmap :: MonadIO m => Ptr () -> Word64 -> Flow m '[(), ErrorCode] Source #

Unmap memory

sysMemProtect :: MonadIO m => Ptr () -> Word64 -> MemProtectFlags -> Flow m '[(), ErrorCode] Source #

Set protection of a region of memory

sysMemAdvise :: MonadIO m => Ptr () -> Word64 -> MemAdvice -> Flow m '[(), ErrorCode] Source #

sysMemSync :: MonadIO m => Ptr () -> Word64 -> MemSyncFlags -> Flow m '[(), ErrorCode] Source #

sysMemLock :: MonadIO m => Ptr () -> Word64 -> Flow m '[(), ErrorCode] Source #

sysMemUnlock :: MonadIO m => Ptr () -> Word64 -> Flow m '[(), ErrorCode] Source #