memfd: Open temporary anonymous Linux file handles

[ apache, filesystem, library, linux ] [ Propose Tags ]

memfd lets us open memory-only files that are not linked into a directory and are not backed by persistent storage. This feature is only available on Linux.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0.0, 1.0.1.0, 1.0.1.1, 1.0.1.2, 1.0.1.3
Change log changelog.md
Dependencies base (>=4.14 && <4.19), transformers (>=0.5.6 && <0.7) [details]
License Apache-2.0
Copyright 2022 Mission Valley Software LLC
Author Chris Martin
Maintainer hello@typeclasses.com
Category Filesystem, Linux
Home page https://github.com/typeclasses/memfd
Bug tracker https://github.com/typeclasses/memfd/issues
Source repo head: git clone git://github.com/typeclasses/memfd.git
Uploaded by chris_martin at 2023-03-24T22:57:52Z
Distributions LTSHaskell:1.0.1.3, NixOS:1.0.1.3
Downloads 319 total (14 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-03-24 [all 1 reports]

Readme for memfd-1.0.1.3

[back to package description]

"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: