custom-allocators
Installation
SKILL.md
Custom Allocators
Purpose
Guide agents through memory allocator design and tuning: pool/slab/arena/buddy taxonomy, jemalloc internals and MALLOC_CONF, mimalloc design, tcmalloc thread-caching, writing a simple pool allocator in C, Rust GlobalAlloc trait, fragmentation metrics, and benchmarking.
When to Use
- Replacing malloc for latency-sensitive or embedded workloads
- Tuning jemalloc/mimalloc for server heap behavior
- Implementing arena allocation for request-scoped or frame-based lifetimes
- Writing a Rust custom global allocator for
no_stdor performance - Diagnosing heap fragmentation (internal vs external)
- Benchmarking allocator throughput and latency