zig-memory
Installation
SKILL.md
Zig Memory Management Guide
Core Principle: Every allocation must have a corresponding deallocation. Use
deferfor normal cleanup,errdeferfor error path cleanup.
This skill ensures safe memory management in Zig, preventing memory leaks and use-after-free bugs.
Official Documentation:
- Memory Allocators: https://ziglang.org/documentation/0.15.2/#Memory
- std.mem: https://ziglang.org/documentation/0.15.2/std/#std.mem
Related Skills:
zig-0.15: API changes including ArrayList allocator parametersolana-sdk-zig: Solana-specific memory constraints (32KB heap)
References
Detailed allocator patterns and examples: