pub struct MemoryPoolManager { /* private fields */ }
Expand description
System-wide memory pool manager.
Implementations§
Source§impl MemoryPoolManager
impl MemoryPoolManager
pub fn new(config: PerfConfig) -> Self
Sourcepub fn get_cpu_pool(&self, cpu_id: CpuId) -> Option<&PerCpuMemoryPool>
pub fn get_cpu_pool(&self, cpu_id: CpuId) -> Option<&PerCpuMemoryPool>
Get per-CPU pool for the specified CPU.
Sourcepub fn allocate_stack(
&self,
cpu_id: CpuId,
size_class: StackSizeClass,
) -> Option<Stack>
pub fn allocate_stack( &self, cpu_id: CpuId, size_class: StackSizeClass, ) -> Option<Stack>
Allocate stack using CPU-local pool.
Sourcepub fn deallocate_stack(
&self,
cpu_id: CpuId,
stack: Stack,
size_class: StackSizeClass,
)
pub fn deallocate_stack( &self, cpu_id: CpuId, stack: Stack, size_class: StackSizeClass, )
Deallocate stack to CPU-local pool.
Sourcepub fn get_system_stats(&self) -> SystemMemoryStats
pub fn get_system_stats(&self) -> SystemMemoryStats
Get system-wide pool statistics.
Auto Trait Implementations§
impl !Freeze for MemoryPoolManager
impl !RefUnwindSafe for MemoryPoolManager
impl Send for MemoryPoolManager
impl Sync for MemoryPoolManager
impl Unpin for MemoryPoolManager
impl !UnwindSafe for MemoryPoolManager
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