haskus-system-0.6.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.Utils.Memory

Description

Memory utilities

Synopsis

Documentation

memCopy :: MonadIO m => Ptr a -> Ptr b -> Word64 -> m () Source #

Copy memory

memSet :: MonadIO m => Ptr a -> Word64 -> Word8 -> m () Source #

Set memory

allocaArrays :: (MonadInIO m, Storable s, Integral a) => [a] -> ([Ptr s] -> m b) -> m b Source #

Allocate several arrays

peekArrays :: (MonadIO m, Storable s, Integral a) => [a] -> [Ptr s] -> m [[s]] Source #

Peek several arrays

pokeArrays :: (MonadIO m, Storable s) => [Ptr s] -> [[s]] -> m () Source #

Poke several arrays

withArrays :: (MonadInIO m, Storable s) => [[s]] -> ([Ptr s] -> m b) -> m b Source #

Allocate several arrays

withMaybeOrNull :: (Storable a, MonadInIO m) => Maybe a -> (Ptr a -> m b) -> m b Source #

Execute f with a pointer to a or NULL