mmap-append

Crates.iommap-append
lib.rsmmap-append
version0.2.0
sourcesrc
created_at2023-07-29 23:49:05.903655
updated_at2024-02-21 01:52:15.610995
descriptionAppend-only memory-mapped I/O, resizable, with low lock contention
homepage
repositoryhttps://github.com/mikedilger/mmap-append
max_upload_size
id929615
size13,556
packaging (github:rustpython:packaging)

documentation

README

mmap-append

This is a memory mapping crate for unix only.

It derives from the mmap crate, and provides a resizable append-only map with very low lock contention. RwLock<MmapMut> from the mmap crate works, but writers block readers and readers block writers. In our implementation, only writers block writers, or they block everything during a resize. the mmap crate doesn't offer resize functionality.

It uses an interior lock to prevent two different processes from appending at the same time, and a different interior lock to get exclusive access during the resize, which may change the virtual address of the map. The virtual address of the map changing should not matter to callers who access the memory via slices, and there can be no active borrowed slices when the resize happens due to the locking mechanism.

Commit count: 12

cargo fmt