Skip to main content

Module pool

Module pool 

Source
Expand description

UnifiedMemoryPool — a bump allocator that amortises the cost of CUDA Unified Memory allocations.

cudaMallocManaged is expensive (tens to hundreds of microseconds per call on busy systems). For Wasm linear memory we want sub-microsecond allocations at instance-spawn time. The pool pre-allocates one large UnifiedBuffer and hands out aligned sub-slices via a simple bump pointer.

Structs§

PoolAllocation
A region of memory carved from a pool. Drops decrement the pool’s live count.
UnifiedMemoryPool
A bump-allocated pool carved from a single underlying UnifiedBuffer.