#[repr(C)]
pub struct AkMemSettings {
Show 22 fields pub pfInitForThread: Option<unsafe extern "C" fn()>, pub pfTermForThread: Option<unsafe extern "C" fn()>, pub pfMalloc: Option<unsafe extern "C" fn(poolId: AkMemPoolId, uSize: c_ulonglong) -> *mut c_void>, pub pfMalign: Option<unsafe extern "C" fn(poolId: AkMemPoolId, uSize: c_ulonglong, uAlignment: AkUInt32) -> *mut c_void>, pub pfRealloc: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void, uSize: c_ulonglong) -> *mut c_void>, pub pfReallocAligned: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void, uSize: c_ulonglong, uAlignment: AkUInt32) -> *mut c_void>, pub pfFree: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void)>, pub pfTotalReservedMemorySize: Option<unsafe extern "C" fn() -> c_ulonglong>, pub pfSizeOfMemory: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void) -> c_ulonglong>, pub uMemAllocationSizeLimit: u64, pub pfAllocVM: Option<unsafe extern "C" fn(size: c_ulonglong, extra: *mut c_ulonglong) -> *mut c_void>, pub pfFreeVM: Option<unsafe extern "C" fn(address: *mut c_void, size: c_ulonglong, extra: c_ulonglong, release: c_ulonglong)>, pub pfAllocDevice: Option<unsafe extern "C" fn(size: c_ulonglong, extra: *mut c_ulonglong) -> *mut c_void>, pub pfFreeDevice: Option<unsafe extern "C" fn(address: *mut c_void, size: c_ulonglong, extra: c_ulonglong, release: c_ulonglong)>, pub uVMPageSize: AkUInt32, pub uDevicePageSize: AkUInt32, pub pfDebugMalloc: Option<unsafe extern "C" fn(poolId: AkMemPoolId, uSize: c_ulonglong, pAddress: *mut c_void, pszFile: *const c_char, uLine: AkUInt32)>, pub pfDebugMalign: Option<unsafe extern "C" fn(poolId: AkMemPoolId, uSize: c_ulonglong, uAlignment: AkUInt32, pAddress: *mut c_void, pszFile: *const c_char, uLine: AkUInt32)>, pub pfDebugRealloc: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pOldAddress: *mut c_void, uSize: c_ulonglong, pNewAddress: *mut c_void, pszFile: *const c_char, uLine: AkUInt32)>, pub pfDebugReallocAligned: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pOldAddress: *mut c_void, uSize: c_ulonglong, uAlignment: AkUInt32, pNewAddress: *mut c_void, pszFile: *const c_char, uLine: AkUInt32)>, pub pfDebugFree: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void)>, pub uMemoryDebugLevel: AkUInt32,
}
Expand description

Initialization settings for the default implementation of the Memory Manager. For more details, see \ref memorymanager_init. \sa AK::MemoryMgr

Fields

pfInitForThread: Option<unsafe extern "C" fn()>

(Optional) Thread-specific allocator initialization hook.

pfTermForThread: Option<unsafe extern "C" fn()>

(Optional) Thread-specific allocator termination hook.

pfMalloc: Option<unsafe extern "C" fn(poolId: AkMemPoolId, uSize: c_ulonglong) -> *mut c_void>

(Optional) Memory allocation hook.

pfMalign: Option<unsafe extern "C" fn(poolId: AkMemPoolId, uSize: c_ulonglong, uAlignment: AkUInt32) -> *mut c_void>

(Optional) Memory allocation hook.

pfRealloc: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void, uSize: c_ulonglong) -> *mut c_void>

(Optional) Memory allocation hook.

pfReallocAligned: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void, uSize: c_ulonglong, uAlignment: AkUInt32) -> *mut c_void>

(Optional) Memory allocation hook.

pfFree: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void)>

(Optional) Memory allocation hook.

pfTotalReservedMemorySize: Option<unsafe extern "C" fn() -> c_ulonglong>

(Optional) Memory allocation statistics hook.

pfSizeOfMemory: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void) -> c_ulonglong>

(Optional) Memory allocation statistics hook.

uMemAllocationSizeLimit: u64

When non-zero, limits the total amount of virtual and device memory allocated by AK::MemoryMgr.

pfAllocVM: Option<unsafe extern "C" fn(size: c_ulonglong, extra: *mut c_ulonglong) -> *mut c_void>

Virtual page allocation hook.

pfFreeVM: Option<unsafe extern "C" fn(address: *mut c_void, size: c_ulonglong, extra: c_ulonglong, release: c_ulonglong)>

Virtual page allocation hook.

pfAllocDevice: Option<unsafe extern "C" fn(size: c_ulonglong, extra: *mut c_ulonglong) -> *mut c_void>

Device page allocation hook.

pfFreeDevice: Option<unsafe extern "C" fn(address: *mut c_void, size: c_ulonglong, extra: c_ulonglong, release: c_ulonglong)>

Device page allocation hook.

uVMPageSize: AkUInt32

Virtual memory page size. Defaults to 0 which means auto-detect.

uDevicePageSize: AkUInt32

Device memory page size. Defaults to 0 which means auto-detect.

pfDebugMalloc: Option<unsafe extern "C" fn(poolId: AkMemPoolId, uSize: c_ulonglong, pAddress: *mut c_void, pszFile: *const c_char, uLine: AkUInt32)>

(Optional) Memory allocation debugging hook. Used for tracking calls to pfMalloc.

pfDebugMalign: Option<unsafe extern "C" fn(poolId: AkMemPoolId, uSize: c_ulonglong, uAlignment: AkUInt32, pAddress: *mut c_void, pszFile: *const c_char, uLine: AkUInt32)>

(Optional) Memory allocation debugging hook. Used for tracking calls to pfMalign.

pfDebugRealloc: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pOldAddress: *mut c_void, uSize: c_ulonglong, pNewAddress: *mut c_void, pszFile: *const c_char, uLine: AkUInt32)>

(Optional) Memory allocation debugging hook. Used for tracking calls to pfRealloc.

pfDebugReallocAligned: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pOldAddress: *mut c_void, uSize: c_ulonglong, uAlignment: AkUInt32, pNewAddress: *mut c_void, pszFile: *const c_char, uLine: AkUInt32)>

(Optional) Memory allocation debugging hook. Used for tracking calls to pfReallocAligned.

pfDebugFree: Option<unsafe extern "C" fn(poolId: AkMemPoolId, pAddress: *mut c_void)>

(Optional) Memory allocation debugging hook. Used for tracking calls to pfFree.

uMemoryDebugLevel: AkUInt32

Default 0 disabled. 1 debug enabled. 2 stomp allocator enabled. 3 stomp allocator and debug enabled. User implementations may use multiple non-zero values to offer different features.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Obtain the default initialization settings for the default implementation of the Memory Manager.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.