The mailbox's memory: one zeroed shared-memory file (memfd on Linux, an unlinked shm_open on macOS) mapped MAP_SHARED, that child processes map too
$ sexc add @ajax/mesh-shm- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 02:57v/# 1 version
- drwxr-xr-x-Oct 27 02:57files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 02:57 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-text ^0.1.0, @ajax/mesh-abi-base ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- @ajax/mesh-inproc, @ajax/mesh-mps, @ajax/mesh-native, @ajax/meshd
- keywords
- mesh alphaos shm memfd mailbox
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-shm
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-shm 2 3The mailbox's memory: a zeroed MAILBOX_BYTES shared-memory file (a close-on-exec memfd on Linux; an unlinked `shm_open` on macOS) mapped `MAP_SHARED`, which native workers and MPS workers map too (`/proc/<pid>/fd/<fd>`). 4 5## Ported from 6 7[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/shm.rs. 8 9## Tests 10 11`tests/shm.c`: the Rust's `two_mappings_share_words` and `shared_with_a_child_process`, the `/proc` path, and a full-size mailbox. 12 13## Licence 14 15MIT. See the repository's LICENSE.