Struct rrise::settings::AkMemSettings
source · #[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: u64When 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: AkUInt32Virtual memory page size. Defaults to 0 which means auto-detect.
uDevicePageSize: AkUInt32Device 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: AkUInt32Default 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
sourceimpl Clone for AkMemSettings
impl Clone for AkMemSettings
sourcefn clone(&self) -> AkMemSettings
fn clone(&self) -> AkMemSettings
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more