zig-memory-management
Installation
SKILL.md
Zig Memory Management
Use this skill when allocating memory, choosing allocators, working with pointers and slices, or understanding Zig's ownership model.
When to Use This Skill
- Choosing an allocator for your use case
- Working with pointers (single-item and many-item)
- Using slices for dynamic-length views
- Understanding alignment requirements
- Implementing custom allocators
- Managing lifetime and ownership
Core Philosophy
Zig has no garbage collector, no hidden allocations, and no default allocator. Functions that need to allocate memory accept an Allocator parameter, making allocation explicit and configurable.