The Flat Memory Model

The task of dynamically allocating memory within an application is greatly simplified in the 32-bit OS/2 Version 2.0 environment through use of the flat memory model. The application developer need no longer be concerned with the maximum 64KB segment size imposed by the 80286 processor architecture. Larger amounts of memory may be allocated and subsequently manipulated as single units known as memory objects, rather than as multiple segments as was the case with previous versions of OS/2. This reduces application complexity, facilitating improved performance and reducing application development time.

This chapter describes the use of the flat memory model for application programming, in order to allocate and manipulate system memory. The chapter also examines the facilities provided by OS/2 Version 2.0 that enable applications to handle memory protection exceptions.

The concept of the flat memory model is described in OS/2 Version 2.0 - Volume 1: Control Program. The functions necessary to manipulate memory from within applications are described in detail in the IBM OS/2 Version 2.0 Control Program Reference.


[Back: Summary]
[Next: DosAllocMem() Function]