@hackage / memfd

Open temporary anonymous Linux file handles

Latest1.0.1.3

About

Metadata

  • Last updated , by chris_martin
  • License Apache-2.0
  • Categories Systems Programming
  • Maintained by: hello@typeclasses.com

  • Lottery factor: 0

Links

Installation

Readme

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