#[repr(C)]pub struct AllocatorApi {
pub system: *mut AllocatorI,
pub end_of_page: *mut AllocatorI,
pub vm: *mut AllocatorI,
pub statistics: *mut AllocatorStatisticsT,
pub create_child: Option<unsafe extern "C" fn(parent: *const AllocatorI, desc: *const c_char) -> AllocatorI>,
pub destroy_child: Option<unsafe extern "C" fn(child: *const AllocatorI)>,
pub destroy_child_allowing_leaks: Option<unsafe extern "C" fn(child: *const AllocatorI, max_leaked_bytes: u64)>,
pub create_leaky_root_scope: Option<unsafe extern "C" fn(parent: *const AllocatorI, desc: *const c_char) -> AllocatorI>,
pub create_fixed_vm: Option<unsafe extern "C" fn(reserve_size: u64, mem_scope: u32) -> AllocatorI>,
}
Fields§
§system: *mut AllocatorI
§end_of_page: *mut AllocatorI
§vm: *mut AllocatorI
§statistics: *mut AllocatorStatisticsT
§create_child: Option<unsafe extern "C" fn(parent: *const AllocatorI, desc: *const c_char) -> AllocatorI>
§destroy_child: Option<unsafe extern "C" fn(child: *const AllocatorI)>
§destroy_child_allowing_leaks: Option<unsafe extern "C" fn(child: *const AllocatorI, max_leaked_bytes: u64)>
§create_leaky_root_scope: Option<unsafe extern "C" fn(parent: *const AllocatorI, desc: *const c_char) -> AllocatorI>
§create_fixed_vm: Option<unsafe extern "C" fn(reserve_size: u64, mem_scope: u32) -> AllocatorI>
Implementations§
Source§impl AllocatorApi
impl AllocatorApi
pub unsafe fn create_child( &self, parent: *const AllocatorI, desc: *const c_char, ) -> AllocatorI
pub unsafe fn destroy_child(&self, child: *const AllocatorI)
pub unsafe fn destroy_child_allowing_leaks( &self, child: *const AllocatorI, max_leaked_bytes: u64, )
pub unsafe fn create_leaky_root_scope( &self, parent: *const AllocatorI, desc: *const c_char, ) -> AllocatorI
pub unsafe fn create_fixed_vm( &self, reserve_size: u64, mem_scope: u32, ) -> AllocatorI
Trait Implementations§
Source§impl Clone for AllocatorApi
impl Clone for AllocatorApi
Source§fn clone(&self) -> AllocatorApi
fn clone(&self) -> AllocatorApi
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for AllocatorApi
impl Default for AllocatorApi
impl Copy for AllocatorApi
Auto Trait Implementations§
impl Freeze for AllocatorApi
impl RefUnwindSafe for AllocatorApi
impl !Send for AllocatorApi
impl !Sync for AllocatorApi
impl Unpin for AllocatorApi
impl UnwindSafe for AllocatorApi
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