Expand description
CUDA Unified Memory allocator and Wasmtime MemoryCreator integration.
Two byte-buffer types:
unified::UnifiedBuffer— CUDA Unified Memory when theunified-memoryfeature is enabled; a heap buffer otherwise.pinned_host::GuardedHostBuffer— guarded host memory for the explicit-fallback path used bycargo build --no-default-features. On all hosts the buffer is bracketed byPROT_NONE/PAGE_NOACCESSguard pages catching OOB reads/writes at the OS level. The managed memory path (UnifiedBufferon CUDA hosts) still cannot use guard pages — that limitation is unchanged. The previous namePinnedHostBufferis preserved as a deprecated alias.
Pools (pool::UnifiedMemoryPool) amortise the cost of CUDA allocations
by carving sub-slices from a single slab. Hints (advise) forward to
cudaMemAdvise on CUDA hosts and are no-ops otherwise.
Modules§
- advise
cudaMemAdvisehint helpers.- isolation
- Memory isolation policy for TensorWasm Wasm instances.
- pinned_
host GuardedHostBuffer— host buffer used when theunified-memoryfeature is disabled.- pool
UnifiedMemoryPool— a bump allocator that amortises the cost of CUDA Unified Memory allocations.- unified
UnifiedBuffer— a region of memory that is addressable from both CPU and GPU when a CUDA backing feature is enabled.- wasm_
memory - Wasmtime
MemoryCreatorbacked byUnifiedBuffer.