Sprint 1: Memory & Control - Expanded Projects
Sprint 1: Memory & Control - Expanded Projects
Goal: Deeply understand memory management and control in C—what memory actually is, why it’s dangerous, how to master it, and why this knowledge is the foundation of all systems programming.
Project Index
| # | Project | Core Topics | Difficulty | Time |
|---|---|---|---|---|
| 1 | Memory Inspector Tool | Pointers & Addresses, Stack vs Heap, Memory Layout | Intermediate | Weekend |
| 2 | Safe String Library | C String Internals, Buffer Overflow Prevention, Bounds Checking | Intermediate | Weekend |
| 3 | Memory Leak Detector | malloc/free Tracking, Memory Leaks, Double-Free Detection | Intermediate | 1-2 weeks |
| 4 | Arena Allocator | Bump Allocation, Custom Allocators, mmap, Memory Alignment | Intermediate | 1 week |
| 5 | Exploit Lab (Buffer Overflow) | Buffer Overflow Exploitation, Stack Frame Layout, Security Mitigations | Advanced | 1-2 weeks |
| 6 | Mini Text Editor (Capstone) | Gap Buffer, Terminal I/O, Undo/Redo, Full Memory Management | Advanced | 2-4 weeks |
Recommended Learning Path
- Start with Memory Inspector (Weekend 1)
- Gets you seeing memory immediately
- Low friction, high insight
- Foundation for everything else
- Then Safe String Library (Weekend 2)
- First taste of “how C fails to protect you”
- Pointer arithmetic becomes intuitive
- Then Arena Allocator (Week 2)
- Demystifies what allocators actually do
- Quick win that builds confidence
- Then Memory Leak Detector (Week 2-3)
- Deepest understanding of lifetime and ownership
- Most directly maps to real debugging skills
- Finish with Exploit Lab (Week 3+)
- Victory lap: everything clicks
- Makes abstract dangers concrete
- Capstone: Mini Text Editor (Week 4+)
- Ultimate integration project
- Proves you can build real, production-quality C software
Why Memory & Control Matters
Every Python list, every JavaScript object, every Rust Vec—underneath, it’s all pointers and bytes. Languages just hide this from you. C shows you the truth.
- The Linux kernel (30+ million lines of C) runs on 96.3% of the world’s top 1 million web servers
- Every major security vulnerability you’ve heard of—Heartbleed, Shellshock, the Morris Worm—exploited C memory bugs
- CVE statistics: ~70% of security vulnerabilities in Microsoft and Google products are memory safety issues
Essential Books
- Computer Systems: A Programmer’s Perspective - Bryant & O’Hallaron
- The C Programming Language - Kernighan & Ritchie
- Understanding and Using C Pointers - Richard Reese
- Hacking: The Art of Exploitation - Jon Erickson
Total Estimated Time: 4-6 weeks of focused study