pub trait SwapStore: Send {
// Required methods
fn record_bytes(&self) -> usize;
fn write_record(
&mut self,
disk_slot: usize,
bytes: &[u8],
) -> Result<(), Error>;
fn read_record(&self, disk_slot: usize, out: &mut [u8]) -> Result<(), Error>;
// Provided method
fn discard_record(&mut self, _disk_slot: usize) { ... }
}Expand description
The generic paging core, lifted to atlas-tier (CUDA- and verbs-free).
Re-exported under the atlas_tier names (no historical aliases).
The cold tier: an unbounded fixed-stride record store addressed by a
monotonic disk_slot index. The peer implements this over an O_DIRECT NVMe
file (crate::DirectSwapFile); crate::MemSwapStore is the host-RAM
variant.
Required Methods§
fn record_bytes(&self) -> usize
fn write_record(&mut self, disk_slot: usize, bytes: &[u8]) -> Result<(), Error>
fn read_record(&self, disk_slot: usize, out: &mut [u8]) -> Result<(), Error>
Provided Methods§
Sourcefn discard_record(&mut self, _disk_slot: usize)
fn discard_record(&mut self, _disk_slot: usize)
Optional: reclaim disk space for a freed slot (default no-op; a hole in a preallocated file is fine — the free-list reuses the index).