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
Auto Trait Implementations§
impl Freeze for HeapRegion
impl RefUnwindSafe for HeapRegion
impl Send for HeapRegion
impl !Sync for HeapRegion
impl Unpin for HeapRegion
impl UnwindSafe for HeapRegion
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