pub struct CudaHbmBackend;Expand description
A zero-sized device backend with an allocator-local HBM pool identity.
The current CUDA provider uses the same managed-memory driver operation as
CudaDeviceBackend. This type separates segment and thread-local pool
ownership for MemoryTier::Hbm without adding a runtime dispatch branch.
Trait Implementations§
Source§impl HasSegmentPool for CudaHbmBackend
impl HasSegmentPool for CudaHbmBackend
Source§fn pools() -> &'static BackendPools
fn pools() -> &'static BackendPools
Returns this backend’s pool bundle.
Source§fn global_segment_pool() -> &'static GlobalSegmentPool
fn global_segment_pool() -> &'static GlobalSegmentPool
Returns the global segment pool for this backend.
Source§fn global_orphan_pool() -> &'static GlobalSegmentPool
fn global_orphan_pool() -> &'static GlobalSegmentPool
Returns the global orphan pool for this backend.
Source§fn global_huge_pool() -> &'static GlobalHugePool
fn global_huge_pool() -> &'static GlobalHugePool
Returns the global huge allocation pool for this backend.
Source§impl LocalAllocatorSelector<CudaHbmBackend> for CudaHbmBackend
impl LocalAllocatorSelector<CudaHbmBackend> for CudaHbmBackend
Source§fn with_allocator<R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>
fn with_allocator<R>( f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R, ) -> Option<R>
Evaluates the closure with a mutable reference to the thread-local allocator cache,
arming the re-entrancy guard. Read more
Source§unsafe fn with_allocator_unguarded<R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>
unsafe fn with_allocator_unguarded<R>( f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R, ) -> Option<R>
Runs
f with the thread-local allocator cache without arming the
re-entrancy guard, returning None on same-thread re-entry. Read moreSource§fn get_allocator_ptr() -> *mut c_void
fn get_allocator_ptr() -> *mut c_void
Returns the raw pointer to the thread-local allocator cache.
Source§fn get_allocator_ptr_raw() -> *mut c_void
fn get_allocator_ptr_raw() -> *mut c_void
Returns the raw pointer to the thread-local allocator cache without triggering lazy initialization.
Source§fn register_current_allocator_ptr(ptr: *mut c_void)
fn register_current_allocator_ptr(ptr: *mut c_void)
Registers a manually created allocator instance as the current thread’s
active cache pointer for this backend mode so direct
ThreadAllocator::new() uses remain compatible with the public free path.Source§fn with_allocator_for_policy<P, R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>where
P: AllocPolicy,
fn with_allocator_for_policy<P, R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>where
P: AllocPolicy,
Runs
f against the TLS allocator selected by the compile-time
free-list encryption mode. Read moreSource§unsafe fn with_allocator_unguarded_for_policy<P, R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>where
P: AllocPolicy,
unsafe fn with_allocator_unguarded_for_policy<P, R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>where
P: AllocPolicy,
Mode-keyed counterpart of
Self::with_allocator_unguarded. Read moreSource§fn get_allocator_ptr_for_policy<P>() -> *mut c_voidwhere
P: AllocPolicy,
fn get_allocator_ptr_for_policy<P>() -> *mut c_voidwhere
P: AllocPolicy,
Returns the initialized mode-keyed allocator pointer, arming its TLS
slot when necessary.
Source§fn get_allocator_ptr_raw_for_policy<P>() -> *mut c_voidwhere
P: AllocPolicy,
fn get_allocator_ptr_raw_for_policy<P>() -> *mut c_voidwhere
P: AllocPolicy,
Returns the initialized mode-keyed allocator pointer without creating
its slot.
Source§impl MemoryBackend for CudaHbmBackend
impl MemoryBackend for CudaHbmBackend
Source§unsafe fn allocate(size: usize) -> *mut u8
unsafe fn allocate(size: usize) -> *mut u8
Allocates from the shared CUDA device driver under the tier pool key.
§Safety
The size must be greater than zero and page-aligned.
Source§unsafe fn deallocate(ptr: *mut u8, size: usize) -> bool
unsafe fn deallocate(ptr: *mut u8, size: usize) -> bool
Releases a device allocation under the tier pool key.
§Safety
The pointer must be valid and the size must match the allocation.
Source§const SUPPORTS_PAGE_RESET: bool = CudaDeviceBackend::SUPPORTS_PAGE_RESET
const SUPPORTS_PAGE_RESET: bool = CudaDeviceBackend::SUPPORTS_PAGE_RESET
Indicates whether the backend supports advisory page resetting.
Source§const SUPPORTS_MAKE_GUARD: bool = CudaDeviceBackend::SUPPORTS_MAKE_GUARD
const SUPPORTS_MAKE_GUARD: bool = CudaDeviceBackend::SUPPORTS_MAKE_GUARD
Indicates whether the backend supports page protection guard installation.
Source§const SUPPORTS_DECOMMIT: bool = CudaDeviceBackend::SUPPORTS_DECOMMIT
const SUPPORTS_DECOMMIT: bool = CudaDeviceBackend::SUPPORTS_DECOMMIT
Indicates whether the backend supports releasing memory commitment while keeping the reservation.
Source§const ENABLE_CPU_CACHE: bool = CudaDeviceBackend::ENABLE_CPU_CACHE
const ENABLE_CPU_CACHE: bool = CudaDeviceBackend::ENABLE_CPU_CACHE
Indicates whether the backend enables the lock-free per-CPU block cache.
Source§unsafe fn page_reset(ptr: *mut u8, size: usize) -> bool
unsafe fn page_reset(ptr: *mut u8, size: usize) -> bool
Asks the OS to drop the physical backing of a mapped page range while
keeping the virtual address range reserved and accessible. Read more
Source§impl PolicySlotSelection<CudaHbmBackend> for StandardPolicy
impl PolicySlotSelection<CudaHbmBackend> for StandardPolicy
Source§fn with_allocator<R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>
fn with_allocator<R>( f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R, ) -> Option<R>
Runs
f with access to the allocator cache selected for this policy.Source§unsafe fn with_allocator_unguarded<R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>
unsafe fn with_allocator_unguarded<R>( f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R, ) -> Option<R>
Runs
f with access to the selected policy cache without arming the
re-entrancy gate. Read moreSource§fn get_allocator_ptr() -> *mut c_void
fn get_allocator_ptr() -> *mut c_void
Returns the initialized allocator pointer for this policy’s TLS slot.
Source§fn get_allocator_ptr_raw() -> *mut c_void
fn get_allocator_ptr_raw() -> *mut c_void
Returns the raw allocator pointer for this policy’s TLS slot without
forcing lazy initialization.
Source§impl PolicySlotSelection<CudaHbmBackend> for SecurePolicy
impl PolicySlotSelection<CudaHbmBackend> for SecurePolicy
Source§fn with_allocator<R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>
fn with_allocator<R>( f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R, ) -> Option<R>
Runs
f with access to the allocator cache selected for this policy.Source§unsafe fn with_allocator_unguarded<R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>
unsafe fn with_allocator_unguarded<R>( f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R, ) -> Option<R>
Runs
f with access to the selected policy cache without arming the
re-entrancy gate. Read moreSource§fn get_allocator_ptr() -> *mut c_void
fn get_allocator_ptr() -> *mut c_void
Returns the initialized allocator pointer for this policy’s TLS slot.
Source§fn get_allocator_ptr_raw() -> *mut c_void
fn get_allocator_ptr_raw() -> *mut c_void
Returns the raw allocator pointer for this policy’s TLS slot without
forcing lazy initialization.
Source§impl PolicySlotSelection<CudaHbmBackend> for HardenedPolicy
impl PolicySlotSelection<CudaHbmBackend> for HardenedPolicy
Source§fn with_allocator<R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>
fn with_allocator<R>( f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R, ) -> Option<R>
Runs
f with access to the allocator cache selected for this policy.Source§unsafe fn with_allocator_unguarded<R>(
f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R,
) -> Option<R>
unsafe fn with_allocator_unguarded<R>( f: impl FnOnce(&mut ThreadAllocator<CudaHbmBackend>) -> R, ) -> Option<R>
Runs
f with access to the selected policy cache without arming the
re-entrancy gate. Read moreSource§fn get_allocator_ptr() -> *mut c_void
fn get_allocator_ptr() -> *mut c_void
Returns the initialized allocator pointer for this policy’s TLS slot.
Source§fn get_allocator_ptr_raw() -> *mut c_void
fn get_allocator_ptr_raw() -> *mut c_void
Returns the raw allocator pointer for this policy’s TLS slot without
forcing lazy initialization.
Auto Trait Implementations§
impl Freeze for CudaHbmBackend
impl RefUnwindSafe for CudaHbmBackend
impl Send for CudaHbmBackend
impl Sync for CudaHbmBackend
impl Unpin for CudaHbmBackend
impl UnsafeUnpin for CudaHbmBackend
impl UnwindSafe for CudaHbmBackend
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