pub struct PoolStats {
pub allocated_bytes: usize,
pub peak_bytes: usize,
pub allocation_count: u64,
pub free_count: u64,
}Expand description
A stream-ordered memory pool (CUDA 11.2+).
Memory pools allow the driver to reuse freed allocations without
returning them to the OS, reducing allocation latency and avoiding
the implicit synchronisation of cuMemFree.
§Status
MemoryPool is a software pool layered on top of cuMemAlloc_v2.
For a thin wrapper over the native CUDA stream-ordered memory pool
API (cuMemPoolCreate, cuMemPoolDestroy, cuMemAllocFromPoolAsync,
cuMemFreeAsync), use NativeMemoryPool.
Statistics for a memory pool’s allocation behaviour.
These statistics track the total bytes allocated, peak usage, allocation count, and free count for a given pool.
Fields§
§allocated_bytes: usizeTotal bytes currently allocated from the pool.
peak_bytes: usizePeak bytes allocated at any point during the pool’s lifetime.
allocation_count: u64Total number of allocations performed.
free_count: u64Total number of frees performed.