package memfd
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=078ae990f6c0924abf294693a91e00c70c9062a925be180f97dee3cba15bb958
sha512=bef05e931bbb75376667957f73fadc81996edcc515023d0bc53e0b6bffac3ba1627b77f58c8d9abd308f5f5c4e4198045276d7ad46bb49bda0854a6a107ea986
Description
A library to create and manage the Linux Memory Mapped Files(memfd). Supports Linux kernel version >= 3.17
README
Memfd
Create and manage Linux Memory Mapped Files
What is memfd
As per Linux manual, "memfd_create() creates an anonymous file and returns a file descriptor that refers to it. The file 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. Anonymous memory is used for all backing pages of the file. Therefore, files created by memfd_create() have the same semantics as other anonymous memory allocations such as those allocated using mmap(2) with the MAP_ANONYMOUS flag."
This library manages the call to Linux memfd_create(), including kernel version guard and other conveniences.
Unix.file_descr and memfd
This library is unopinionated about the conversion between Unix.file_descr and memfd, therefore no such function is exposed. You can check out this line in the test for reference: https://github.com/gborough/memfd/blob/b3a615924aff705798d7c6e4e33f48cf51fa64a8/test/test_memfd.ml#L11
CAVEAT
To use this library on Alpine Linux/musl, make sure to install related packages that include memfd.h
Dev Dependencies (2)
-
odoc
with-doc -
ppx_expect
with-test
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building memfd with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.1.0 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure