Step Into C · Lesson 26 · Win32 in Depth
Memory: Pages, Protections and Heaps
VirtualAlloc reserve vs commit, VirtualProtect and VirtualQuery, private heaps, and when to use which.
- ~40 minreading and coding
- 4missions
- membersaccess
- Win32real Windows API
Part of Step Into C. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.
malloc and new sit on top of a heap, and a heap gets its pages from the virtual memory layer.
In this lesson
- Two layers of memory management
- Reserve, then commit
- Protections
- Heaps
Missions
- The two magic numbers
- Reserve, then commit
- Change the protection
- A heap of your own