pub struct ExpertArena { /* private fields */ }Expand description
2026-09-25: Slabs of slots, each slot one expert record of record_stride
bytes.
Implementations§
Source§impl ExpertArena
impl ExpertArena
Sourcepub fn new(
num_slabs: u32,
slots_per_slab: u32,
record_stride: usize,
) -> Result<Self>
pub fn new( num_slabs: u32, slots_per_slab: u32, record_stride: usize, ) -> Result<Self>
2026-09-25: Allocate num_slabs * slots_per_slab * record_stride pinned
bytes. Fails on a zero dimension, a stride that is not a multiple of
4096, a size overflow, or a device address that differs from the host
address.
pub fn num_slabs(&self) -> u32
pub fn slots_per_slab(&self) -> u32
pub fn record_stride(&self) -> usize
Sourcepub fn slot_host_ptr(&self, slab: u32, slot: u32) -> Result<*mut u8>
pub fn slot_host_ptr(&self, slab: u32, slot: u32) -> Result<*mut u8>
2026-09-25: Host pointer of a slot, where its record is written.
Sourcepub fn slot_dev_va(&self, slab: u32, slot: u32) -> Result<u64>
pub fn slot_dev_va(&self, slab: u32, slot: u32) -> Result<u64>
2026-09-25: Device address of a slot.
Sourcepub fn base_ptr(&self) -> *mut c_void
pub fn base_ptr(&self) -> *mut c_void
2026-09-25: Base of the pinned allocation; with total_bytes it
describes the whole arena.
pub fn total_bytes(&self) -> usize
Auto Trait Implementations§
impl Freeze for ExpertArena
impl RefUnwindSafe for ExpertArena
impl Send for ExpertArena
impl Sync for ExpertArena
impl Unpin for ExpertArena
impl UnwindSafe for ExpertArena
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more