Memory Management

The 32-bit Windows NT operating system offers a similar Windows
programming interface to the 16-bit Windows 3.x; there is considerable source code
compatibility between the two. However, Windows 3.x is heavily tied to the Intel family of
80*86 processors, whereas Windows NT is very much a multi-platform operating system,
designed to port easily to any 32-bit processor. It already runs on Intels
80386/80486, MIPS R4000 and DEC Alpha AXP processors. So you would expect the area of
memory management to be quite different between Windows 3.x and Windows NT - and you would be right!
Windows NT is designed to offer 32-bit demand-paged virtual memory, and all the
processors mentioned above support this feature. In flat memory model, each
application has its own private 4 GB logical address space and memory allocation is
performed on a uniform page basis rather than using segments.
The memory management API allows a program to allocate memory while it is executing , and provides a mechanism for sharing memory.
It also permits blocks of memory to be sub-allocated and offers backward compatibility for
16-bit applications.
In this chapter, we learn how to use the memory management API to reserve, commit,
share and sub-allocate memory regions.
Objectives
When you have completed this chapter, you should be able to:
Describe the differences between the Win 16 and Win32-bit memory management APIs
Explain the difference between reserving and committing memory
Write programs that use dynamic memory allocation
Allocate shared memory, anonymously or by name
Sub-allocate blocks of memory from a memory heap |