Expand description
Memory pooling for frequent allocations
This module provides memory pools for common allocation patterns:
- Block buffer pool (reuse Bytes allocations)
- CID string pool (deduplicate strings)
- IPLD node pool
Memory pooling reduces allocator pressure by reusing existing allocations.
Structs§
- Bytes
Pool - A pool of reusable byte buffers
- CidString
Pool - A pool for CID strings to reduce duplication
- Pool
Stats - Statistics for a memory pool
Functions§
- freeze_
bytes - Helper to convert BytesMut to Bytes efficiently
- global_
bytes_ pool - Get the global bytes pool
- global_
cid_ string_ pool - Get the global CID string pool