1 The Program and the Heap

The heap is one of the principal memory areas created when an NT process is started ('NT' as used in this guide includes Windows 2000, XP etc.). An application uses the heap for storing data the size of which cannot be predicted at compile time. Examples of data structures stored on the heap are:

Heap data are not lost when the routine that creates them exits, but persist until explicitly freed, for example by the C++ delete operator.

The heap starts out as a small memory area and is expanded as required during the lifetime of the process, up to the limit of available memory.

1.1 Classical Organisation
1.2 NT Heap Organisation
1.3 LeapHeap Organisation