previousupnext

1.2 NT Heap Organisation

Under Windows NT, every process has a 2 GB (one gigabyte is two to the power 30 bytes) address range for its exclusive use regardless of the amount of Random Access Memory (RAM) the machine it runs on is fitted with. NT is a multithreading operating system, so provision must be made for multiple thread stacks. Because of this and because extra code in the form of Dynamic Link Libraries (DLLs) may be loaded at any time during the life of the process, the stacks, code and static data are scattered unpredictably around memory.

Nevertheless, each process needs only a single heap. Therefore a possible memory organisation for some hypothetical process that links two DLLs and runs three concurrent threads might look like this:


In practice you are unlikely to find an NT application that makes do with just one heap. This is not because of anything inherent in the operating system; it is to do with the compilers and other tools used to develop applications.


1.2.1 Private Heaps and Contention
1.2.2 Private Heaps and Locality
1.2.3 Programming Constraints