#[repr(C)]pub struct IMemoryHeap {
pub vtable: *const IMemoryHeapVtbl,
}
Expand description
Memory heap interface
Fields§
§vtable: *const IMemoryHeapVtbl
Implementations§
Source§impl IMemoryHeap
impl IMemoryHeap
Sourcepub const RTTI: VariantID = RTTI_IMemoryHeap
pub const RTTI: VariantID = RTTI_IMemoryHeap
Address & Offset of the runtime type information (RTTI) identifier.
Sourcepub const VTABLE: [VariantID; 1] = VTABLE_IMemoryHeap
pub const VTABLE: [VariantID; 1] = VTABLE_IMemoryHeap
Address & Offset of the virtual function table.
Sourcepub unsafe fn allocate(&mut self, size: usize, alignment: u32) -> *mut c_void
pub unsafe fn allocate(&mut self, size: usize, alignment: u32) -> *mut c_void
Allocate memory with alignment.
§Safety
Sourcepub unsafe fn deallocate(&mut self, mem: *mut c_void, alignment: u32)
pub unsafe fn deallocate(&mut self, mem: *mut c_void, alignment: u32)
Deallocate memory.
§Safety
Sourcepub unsafe fn pointer_in_heap(&self, pointer: *const c_void) -> bool
pub unsafe fn pointer_in_heap(&self, pointer: *const c_void) -> bool
Check if a pointer is in the heap.
§Safety
Sourcepub unsafe fn total_size(&self, pointer: *const c_void) -> usize
pub unsafe fn total_size(&self, pointer: *const c_void) -> usize
Get the total size of a block in the heap.
§Safety
Sourcepub unsafe fn get_heap_stats(
&mut self,
stats: *mut HeapStats,
full_block_info: bool,
)
pub unsafe fn get_heap_stats( &mut self, stats: *mut HeapStats, full_block_info: bool, )
Get the heap statistics.
§Safety
Sourcepub unsafe fn should_try_small_block_pools(
&self,
size: usize,
context: MEM_CONTEXT,
) -> bool
pub unsafe fn should_try_small_block_pools( &self, size: usize, context: MEM_CONTEXT, ) -> bool
Check if small block pools should be tried.
§Safety
Sourcepub unsafe fn get_page_size(&self) -> u32
pub unsafe fn get_page_size(&self) -> u32
Get the page size.
§Safety
Auto Trait Implementations§
impl Freeze for IMemoryHeap
impl RefUnwindSafe for IMemoryHeap
impl !Send for IMemoryHeap
impl !Sync for IMemoryHeap
impl Unpin for IMemoryHeap
impl UnwindSafe for IMemoryHeap
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