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§
- Pool
Allocation - A region of memory carved from a pool. Drops decrement the pool’s live count.
- Unified
Memory Pool - A bump-allocated pool carved from a single underlying
UnifiedBuffer.