pub struct PinnedHostBuf { /* private fields */ }Expand description
Owned page-locked CACHEABLE host buffer (flags=0, deliberately NOT write-combined) for the
prefix-cache host tier (lane/kv-host-spill-20260830). Same allocation class as PinnedStage
above and for the same reason: ctx().alloc_pinned is CU_MEMHOSTALLOC_WRITECOMBINED, which
is right for H2D-only staging but pathologically slow for host READS (see the HostBuf CAVEAT
in model.rs), and these bytes are CPU-read by the MEMRA_KV_HOST_VERIFY digest arm. Public
because the server’s host-tier cache owns these buffers across requests.
Implementations§
Source§impl PinnedHostBuf
impl PinnedHostBuf
Sourcepub fn new(len: usize) -> Result<Self, Box<dyn Error>>
pub fn new(len: usize) -> Result<Self, Box<dyn Error>>
Allocate len pinned cacheable bytes (a zero-length request still pins one byte so the
pointer stays valid, mirroring the device planes’ alloc_u8(kb.max(1)) convention).
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Trait Implementations§
Source§impl Drop for PinnedHostBuf
impl Drop for PinnedHostBuf
impl Send for PinnedHostBuf
Auto Trait Implementations§
impl !Sync for PinnedHostBuf
impl Freeze for PinnedHostBuf
impl RefUnwindSafe for PinnedHostBuf
impl Unpin for PinnedHostBuf
impl UnsafeUnpin for PinnedHostBuf
impl UnwindSafe for PinnedHostBuf
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