HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleunix-memory-0.1.2Haskell98

System.Posix.Memory

Functions defined by the POSIX standards for manipulating memory maps

When a function that calls an underlying POSIX function fails, the errno code is converted to an IOError using errnoToIOError. For a list of which errno codes may be generated, consult the POSIX documentation for the underlying function.

  • 4 types
  • 8 values
  • Packageunix-memory-0.1.2
  • Exports12
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceMemory.hsc
valuememoryMap
  1. :: Maybe (Ptr a)

    The address to map to if MapFixed is used.

  2. -> CSize

    The length of the mapping

  3. -> [MemoryProtection]

    the memory protection associated with the mapping

  4. -> MemoryMapFlag
  5. -> Maybe Fd
  6. -> COff
  7. -> IO (Ptr a)
#

Map pages of memory.

If fd is present, this memory will represent the file associated. Otherwise, the memory will be an anonymous mapping.

use mmap

valuememorySync :: Ptr a -> CSize -> [MemorySyncFlag] -> IO ()
#

memorySync synchronize memory with physical storage.

On an anonymous mapping this function doesn't have any effect. call msync

Flags types

4 declarations
datadata MemoryAdvice
#

Advice to put on memory.

only define the posix one.

Constructors

Instances3Eq, Read, Show

system page size

1 declaration