ReadonlybytesTotal bytes currently held by callers (not in the pool).
ReadonlybytesTotal bytes free-listed and ready to be reused.
ReadonlychunkGaussians-per-chunk granularity this pool allocates for.
Acquire a ChunkData buffer for the given layer/layout holding
count gaussians of valid data (0 < count <= chunkSize). Reuses a
pooled buffer of matching capacity if available; otherwise allocates a
new one.
Drop all pooled buffers. Buffers in use are unaffected.
Free pooled buffers until bytesPooled <= targetBytes.
A pool-backed allocator for ChunkData buffers.
The pool owns a single
chunkSize(the gaussians-per-chunk granularity); every buffer it hands out is backed by anArrayBufferof full capacity (chunkSize * stride). A short final chunk's buffer therefore shares a pool slot with full-chunk buffers of the same layer stride — the pool keys on the buffer's byte size, so reuse is by capacity, not by the (possibly smaller)count.No
GraphicsDeviceis required: these are CPU buffers. A consumer that needs GPU-resident data uploadschunkData.dataitself.Pool growth is bounded by
maxPooledBytes(default 2 GB). On release, if pooling the buffer would exceed the cap, it is dropped (left to the garbage collector) instead. Call ChunkDataPool.trim to free pooled buffers down to a target.