MSDN Documentation

Windows Memory Management Code Samples

Dynamic Memory Allocation (Heap)

Demonstrates how to allocate and free memory on the heap using functions like HeapAlloc and HeapFree.

C++ Heap Allocation
View Sample

Virtual Memory Mapping

Illustrates the use of VirtualAlloc and VirtualFree for mapping memory regions in the process address space.

C++ Virtual Memory Mapping
View Sample

Memory Protection Flags

Explores how to set memory protection levels (e.g., Read, Write, Execute) using VirtualProtect.

C++ VirtualProtect Protection
View Sample

Large Pages Allocation

A guide on allocating and using large memory pages for performance-critical applications.

C++ Large Pages Performance
View Sample

Memory-Mapped Files

Shows how to use memory-mapped files for efficient inter-process communication and data access.

C++ Memory-Mapped Files IPC
View Sample

Stack Allocation vs. Heap Allocation

Compares the characteristics and performance implications of stack-based and heap-based memory allocation.

C++ Stack Heap Comparison
View Sample