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
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for AkMemSettings
impl Debug for AkMemSettings
sourceimpl Default for AkMemSettings
impl Default for AkMemSettings
impl Copy for AkMemSettings
Auto Trait Implementations
impl RefUnwindSafe for AkMemSettings
impl Send for AkMemSettings
impl Sync for AkMemSettings
impl Unpin for AkMemSettings
impl UnwindSafe for AkMemSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more