pub struct MemoryBackendWrapper;Expand description
High-level OS page mapping backend helper. Owns the wrapper struct
shape and forwards the platform-conditional capability consts from
crate::DefaultBackend; per-method bodies delegate to
per-concern helpers in crate::guard and crate::reset.
Trait Implementations§
Source§impl HasSegmentPool for MemoryBackendWrapper
impl HasSegmentPool for MemoryBackendWrapper
Source§fn pools() -> &'static BackendPools
fn pools() -> &'static BackendPools
Source§fn global_segment_pool() -> &'static GlobalSegmentPool
fn global_segment_pool() -> &'static GlobalSegmentPool
Source§fn global_orphan_pool() -> &'static GlobalSegmentPool
fn global_orphan_pool() -> &'static GlobalSegmentPool
Source§fn global_huge_pool() -> &'static GlobalHugePool
fn global_huge_pool() -> &'static GlobalHugePool
Source§impl LocalAllocatorSelector<MemoryBackendWrapper> for MemoryBackendWrapper
impl LocalAllocatorSelector<MemoryBackendWrapper> for MemoryBackendWrapper
Source§fn with_allocator<R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>
fn with_allocator<R>( f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R, ) -> Option<R>
Source§unsafe fn with_allocator_unguarded<R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>
unsafe fn with_allocator_unguarded<R>( f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R, ) -> Option<R>
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
Source§fn get_allocator_ptr_raw() -> *mut c_void
fn get_allocator_ptr_raw() -> *mut c_void
Source§fn register_current_allocator_ptr(ptr: *mut c_void)
fn register_current_allocator_ptr(ptr: *mut c_void)
ThreadAllocator::new() uses remain compatible with the public free path.Source§fn with_allocator_for_policy<P, R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>where
P: AllocPolicy,
fn with_allocator_for_policy<P, R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>where
P: AllocPolicy,
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<MemoryBackendWrapper>) -> R,
) -> Option<R>where
P: AllocPolicy,
unsafe fn with_allocator_unguarded_for_policy<P, R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>where
P: AllocPolicy,
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,
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,
Source§impl MemoryBackend for MemoryBackendWrapper
impl MemoryBackend for MemoryBackendWrapper
Source§unsafe fn make_guard(ptr: *mut u8, size: usize) -> bool
unsafe fn make_guard(ptr: *mut u8, size: usize) -> bool
Installs a PROT_NONE / PAGE_NOACCESS guard region.
Delegates to crate::guard::do_make_guard which records the
confirmed install through crate::recorders::record_guard_install.
Source§unsafe fn page_reset(ptr: *mut u8, size: usize) -> bool
unsafe fn page_reset(ptr: *mut u8, size: usize) -> bool
Drops the physical backing of an idle page range while keeping the virtual mapping committed.
Delegates to crate::reset::do_page_reset which records the
confirmed reset through crate::recorders::record_page_reset.
Source§unsafe fn decommit(ptr: *mut u8, size: usize) -> bool
unsafe fn decommit(ptr: *mut u8, size: usize) -> bool
Releases the commit charge / physical backing of a page-aligned range while keeping the reservation.
Delegates to crate::reset::do_decommit which records the
confirmed decommit through crate::recorders::record_decommit.
Source§const SUPPORTS_PAGE_RESET: bool = DefaultBackend::SUPPORTS_PAGE_RESET
const SUPPORTS_PAGE_RESET: bool = DefaultBackend::SUPPORTS_PAGE_RESET
Source§const SUPPORTS_MAKE_GUARD: bool = DefaultBackend::SUPPORTS_MAKE_GUARD
const SUPPORTS_MAKE_GUARD: bool = DefaultBackend::SUPPORTS_MAKE_GUARD
Source§const SUPPORTS_DECOMMIT: bool = DefaultBackend::SUPPORTS_DECOMMIT
const SUPPORTS_DECOMMIT: bool = DefaultBackend::SUPPORTS_DECOMMIT
Source§const ENABLE_CPU_CACHE: bool = DefaultBackend::ENABLE_CPU_CACHE
const ENABLE_CPU_CACHE: bool = DefaultBackend::ENABLE_CPU_CACHE
Source§impl PolicySlotSelection<MemoryBackendWrapper> for StandardPolicy
impl PolicySlotSelection<MemoryBackendWrapper> for StandardPolicy
Source§fn with_allocator<R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>
fn with_allocator<R>( f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R, ) -> Option<R>
f with access to the allocator cache selected for this policy.Source§unsafe fn with_allocator_unguarded<R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>
unsafe fn with_allocator_unguarded<R>( f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R, ) -> Option<R>
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
Source§fn get_allocator_ptr_raw() -> *mut c_void
fn get_allocator_ptr_raw() -> *mut c_void
Source§impl PolicySlotSelection<MemoryBackendWrapper> for SecurePolicy
impl PolicySlotSelection<MemoryBackendWrapper> for SecurePolicy
Source§fn with_allocator<R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>
fn with_allocator<R>( f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R, ) -> Option<R>
f with access to the allocator cache selected for this policy.Source§unsafe fn with_allocator_unguarded<R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>
unsafe fn with_allocator_unguarded<R>( f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R, ) -> Option<R>
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
Source§fn get_allocator_ptr_raw() -> *mut c_void
fn get_allocator_ptr_raw() -> *mut c_void
Source§impl PolicySlotSelection<MemoryBackendWrapper> for HardenedPolicy
impl PolicySlotSelection<MemoryBackendWrapper> for HardenedPolicy
Source§fn with_allocator<R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>
fn with_allocator<R>( f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R, ) -> Option<R>
f with access to the allocator cache selected for this policy.Source§unsafe fn with_allocator_unguarded<R>(
f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R,
) -> Option<R>
unsafe fn with_allocator_unguarded<R>( f: impl FnOnce(&mut ThreadAllocator<MemoryBackendWrapper>) -> R, ) -> Option<R>
f with access to the selected policy cache without arming the
re-entrancy gate. Read more