[−][src]Trait physx::foundation::AllocatorCallback
A trait for creating allocator callbacks for PhysX.
Reporting the name, file and line is not enabled by default.
Use set_report_allocation_names
to toggle this on or off.
Required methods
pub 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
[src]
size: u64,
name: *const c_void,
file: *const c_void,
line: u32,
user_data: *const c_void
) -> *mut c_void
Safety
allocations must be align 16. This should not panic, since it is called in an FFI context and unwinding across the FFI barrier is UB.
pub unsafe extern "C" fn deallocate(
ptr: *const c_void,
user_data: *const c_void
)
[src]
ptr: *const c_void,
user_data: *const c_void
)
Safety
must not panic.
Provided methods
pub unsafe fn into_px(self) -> *mut PxAllocatorCallback
[src]
Safety
do not override this method.
Implementors
impl AllocatorCallback for DefaultAllocator
[src]
pub unsafe fn into_px(self) -> *mut PxAllocatorCallback
[src]
pub 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
[src]
_size: u64,
_name: *const c_void,
_file: *const c_void,
_line: u32,
_user_data: *const c_void
) -> *mut c_void
pub unsafe extern "C" fn deallocate(
_ptr: *const c_void,
_user_data: *const c_void
)
[src]
_ptr: *const c_void,
_user_data: *const c_void
)
impl AllocatorCallback for GlobalAllocCallback
[src]
pub 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
[src]
size: u64,
_name: *const c_void,
_file: *const c_void,
_line: u32,
_user_data: *const c_void
) -> *mut c_void
pub unsafe extern "C" fn deallocate(
ptr: *const c_void,
_user_data: *const c_void
)
[src]
ptr: *const c_void,
_user_data: *const c_void
)