Struct machinery_api::foundation::MemoryTrackerApi [−][src]
#[repr(C)]pub struct MemoryTrackerApi { pub check_for_leaked_scopes: Option<unsafe extern "C" fn()>, pub create_scope: Option<unsafe extern "C" fn(desc: *const c_char, parent_scope: u32) -> u32>, pub destroy_scope: Option<unsafe extern "C" fn(s: u32)>, pub destroy_scope_allowing_leaks: Option<unsafe extern "C" fn(scope: u32, max_leaked_bytes: u64)>, pub record_realloc: Option<unsafe extern "C" fn(old_ptr: *mut c_void, old_size: u64, new_ptr: *mut c_void, new_size: u64, file: *const c_char, line: u32, scope: u32)>, pub allocated_bytes: Option<unsafe extern "C" fn(scope: u32) -> u64>, pub allocation_count: Option<unsafe extern "C" fn(scope: u32) -> u64>, pub set_scope_tracing: Option<unsafe extern "C" fn(scope: u32, enabled: bool)>, pub scope_data_snapshot: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *mut MemoryTrackerScopeDataT>, pub trace_data_snapshot: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *mut MemoryTrackerTraceDataT>, }
Fields
check_for_leaked_scopes: Option<unsafe extern "C" fn()>create_scope: Option<unsafe extern "C" fn(desc: *const c_char, parent_scope: u32) -> u32>destroy_scope: Option<unsafe extern "C" fn(s: u32)>destroy_scope_allowing_leaks: Option<unsafe extern "C" fn(scope: u32, max_leaked_bytes: u64)>record_realloc: Option<unsafe extern "C" fn(old_ptr: *mut c_void, old_size: u64, new_ptr: *mut c_void, new_size: u64, file: *const c_char, line: u32, scope: u32)>allocated_bytes: Option<unsafe extern "C" fn(scope: u32) -> u64>allocation_count: Option<unsafe extern "C" fn(scope: u32) -> u64>set_scope_tracing: Option<unsafe extern "C" fn(scope: u32, enabled: bool)>scope_data_snapshot: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *mut MemoryTrackerScopeDataT>trace_data_snapshot: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *mut MemoryTrackerTraceDataT>Implementations
pub unsafe fn record_realloc(
&self,
old_ptr: *mut c_void,
old_size: u64,
new_ptr: *mut c_void,
new_size: u64,
file: *const c_char,
line: u32,
scope: u32
)
pub unsafe fn scope_data_snapshot(
&self,
ta: *mut TempAllocatorI
) -> *mut MemoryTrackerScopeDataT
pub unsafe fn trace_data_snapshot(
&self,
ta: *mut TempAllocatorI
) -> *mut MemoryTrackerTraceDataT
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for MemoryTrackerApi
impl Send for MemoryTrackerApi
impl Sync for MemoryTrackerApi
impl Unpin for MemoryTrackerApi
impl UnwindSafe for MemoryTrackerApi
Blanket Implementations
Mutably borrows from an owned value. Read more