mnemosyne-memory-core 0.3.0

Core allocator types, policies, and validation for Mnemosyne
Documentation
  • Coverage
  • 100%
    172 out of 172 items documented0 out of 55 items with examples
  • Size
  • Source code size: 260.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.2 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • ryancinsight/Mnemosyne
    1 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ryancinsight

mnemosyne-memory-core

Core types, constants, size classes, and synchronization primitives for the Mnemosyne allocator. The library name is mnemosyne_core; the crates.io package is mnemosyne-memory-core.

This is the foundation crate: every other Mnemosyne crate depends on it, and it depends on nothing in the workspace. It is #![no_std].

[dependencies]
mnemosyne-memory-core = "0.2"

Contents

  • policy — the AllocPolicy sealed trait and its zero-sized implementations (StandardPolicy, SecurePolicy, HardenedPolicy). Policy selection is a type parameter, so the unused branch is dead code at compile time.
  • types — Page, the free-list types, and AtomicFreeList, the page-local lock-free cross-thread free queue. Page is pinned to exactly one 64-byte cache line by a layout test.
  • size_class — size-class derivation shared by every allocation path.
  • validation — is_valid_alloc_request and is_valid_layout_alloc_request, the two const fn predicates every allocation entry point routes through, so MAX_ALLOC_SIZE and the alignment rules have one definition.
  • constants — segment and page geometry (2 MiB segments, 64 KiB pages).
  • sync, loom_shim — synchronization primitives, swappable for loom's model-checked equivalents under cfg(loom).
  • abort — the single authoritative corruption sink.

This crate defines the MemoryBackend contract but implements no backend; see mnemosyne-backend.

Licensed under MIT OR Apache-2.0.