A C99 memory manager for a simulated 64 KB embedded RAM, built across four levels: fixed and variable-size allocation, fragmentation control, task quotas and leak scans, then handle-based compaction and out-of-memory recovery.
The system
This project implements memory-management concepts over a simulated 64 KB embedded memory system. The repository is organized as progressive levels, with each level building on the previous one and introducing another systems concern.
What I implemented
- Fixed-size allocation: blocks with metadata checksum validation.
- Variable-size allocation: First-Fit and Best-Fit strategies, block splitting, and coalescing.
- Task-aware management: per-task quotas, peak-usage tracking, and leak scanning.
- Recovery under pressure: handle-based allocation, heap compaction, and an out-of-memory eviction fallback.
The repository includes runnable C99 programs for each level and a script to run them together. The README records the project structure and build commands.
Evidence
The source code and runnable levels are available in the GitHub repository.
