Struct physx::foundation::TrackingAllocator
source · [−]pub struct TrackingAllocator {
pub allocated: AtomicUsize,
pub deallocated: AtomicUsize,
}
Expand description
A simple tracking allocator that calls through to Rust’s GlobalAllocator. Note that it tracks the amount of space needed for storing the allocation sizes as well as the actual data.
Fields
allocated: AtomicUsize
deallocated: AtomicUsize
Trait Implementations
sourceimpl AllocatorCallback for TrackingAllocator
impl AllocatorCallback for TrackingAllocator
sourceunsafe extern "C" fn allocate(
size: u64,
_name: *const c_void,
_file: *const c_void,
_line: u32,
user_data: *const c_void
) -> *mut c_void
unsafe extern "C" fn allocate(
size: u64,
_name: *const c_void,
_file: *const c_void,
_line: u32,
user_data: *const c_void
) -> *mut c_void
Safety Read more
sourceunsafe extern "C" fn deallocate(
ptr: *const c_void,
user_data: *const c_void
)
unsafe extern "C" fn deallocate(
ptr: *const c_void,
user_data: *const c_void
)
Safety Read more
sourceunsafe fn into_px(self) -> *mut PxAllocatorCallback
unsafe fn into_px(self) -> *mut PxAllocatorCallback
Safety Read more
Auto Trait Implementations
impl RefUnwindSafe for TrackingAllocator
impl Send for TrackingAllocator
impl Sync for TrackingAllocator
impl Unpin for TrackingAllocator
impl UnwindSafe for TrackingAllocator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more