mirror of
https://github.com/lexmount/moli.git
synced 2026-10-09 00:01:06 +00:00
Store immutable resource extents in one anonymous temporary file using positioned I/O. Reuse exact or worst-fit holes through offset and size indexes, coalesce released extents, and preserve bounded-capacity and failure behavior. Include allocator regression tests, concise documentation, and runnable examples.
20 lines
547 B
Rust
20 lines
547 B
Rust
//! Shared single-file storage for resource data.
|
|
//!
|
|
//! The allocation policy follows Blink's `DiskDataAllocator`: allocations are
|
|
//! represented by `(offset, len)` extents in one anonymous temporary file,
|
|
//! exact free extents are preferred, otherwise the largest fitting extent is
|
|
//! split, and adjacent free extents are coalesced on release.
|
|
|
|
mod allocation;
|
|
mod data;
|
|
mod file;
|
|
mod pool;
|
|
mod reservation;
|
|
|
|
pub use data::DiskData;
|
|
pub use pool::{DiskPool, DiskPoolDiagnostics};
|
|
pub use reservation::ReservedChunk;
|
|
|
|
#[cfg(test)]
|
|
mod tests;
|