memfd

Open temporary anonymous Linux file handles

https://github.com/typeclasses/memfd

Version on this page:1.0.1.2
LTS Haskell 22.21:1.0.1.3
Stackage Nightly 2023-12-26:1.0.1.3
Latest on Hackage:1.0.1.3

See all snapshots memfd appears in

Apache-2.0 licensed by Chris Martin
Maintained by [email protected]
This version can be pinned in stack with:memfd-1.0.1.2@sha256:6d139bcfde1c3bafda4485cdc6b3c41f455cb45460506798f86dfa511de103d3,1578

Module documentation for 1.0.1.2

Depends on 2 packages(full list with versions):

“memfd” (memory file descriptor) memfd lets us open memory-only files that are not linked into a directory and are not backed by persistent storage. Such a file is described as an “anonymous file”. It behaves like a regular file, and so can be modified, truncated, memory-mapped, and so on. However, unlike a regular file, it lives in RAM and has a volatile backing storage. Once all references to the file are dropped, it is automatically released.

This feature is only available on Linux.

The recommended way to import this library is:

import qualified Memfd

There is one central function:

create :: CreateOptions -> IO Fd

Fd stands for “file descriptor”. Here are some things you can do with a file descriptor:

Changes

1.0.1.2 (2023-03-15)

Support GHC 9.6

1.0.1.1 (2022-01-01)

Support GHC 9.4

1.0.1.0 (2022-06-13)

Add Memfd.defaultCreateOptions

1.0.0.0 (2022-06-13)

Initial release