pub struct HeapRegion { /* private fields */ }
Expand description
A memory region to be used as heap memory
Implementations§
Source§impl HeapRegion
impl HeapRegion
Sourcepub unsafe fn new(
heap_bottom: *mut u8,
size: usize,
capabilities: EnumSet<MemoryCapability>,
) -> Self
pub unsafe fn new( heap_bottom: *mut u8, size: usize, capabilities: EnumSet<MemoryCapability>, ) -> Self
Create a new HeapRegion with the given capabilities
§Safety
- The supplied memory region must be available for the entire program
(
'static
). - The supplied memory region must be exclusively available to the heap only, no aliasing.
size > 0
.
Sourcepub fn stats(&self) -> RegionStats
pub fn stats(&self) -> RegionStats
Return stats for the current memory region