pub struct NumaAlignedBuffer { /* private fields */ }Implementations§
Source§impl NumaAlignedBuffer
impl NumaAlignedBuffer
pub fn numa_node(&self) -> usize
pub fn as_ptr(&self) -> *const u8
pub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn set_len(&mut self, len: usize)
pub fn clear(&mut self)
Sourcepub fn mlock(&self) -> Result<()>
pub fn mlock(&self) -> Result<()>
Lock the buffer in memory using mlock to prevent page faults.
§Errors
Returns an error if mlock fails.
Sourcepub fn lock_and_prefault(&mut self) -> Result<()>
pub fn lock_and_prefault(&mut self) -> Result<()>
Lock and prefault the buffer for zero-latency access on hot path.
§Errors
Returns an error if mlock fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NumaAlignedBuffer
impl RefUnwindSafe for NumaAlignedBuffer
impl Send for NumaAlignedBuffer
impl Sync for NumaAlignedBuffer
impl Unpin for NumaAlignedBuffer
impl UnwindSafe for NumaAlignedBuffer
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