OS/2 Version 2.0 provides significant enhancements in memory management over previous versions of OS/2. Full use is made in Version 2.0 of the 32-bit addressing and paged virtual memory capabilities of the Intel 80386 processor, giving theoretical access to 4GB of memory per process. In practical terms, however, it is unlikely that the full amount of memory could be used, due to other constraining factors such as hardware limitations.
OS/2 Version 2.0 manages its memory as a single linear address space of up to 4GB in size. This global address space is divided into a number of regions. The region below 512MB is known as the process address space, and is available to applications for storage of executable code, resources and data. The region above 512MB is reserved for operating system use. The choice of 512MB as the dividing line between the two regions allows 16-bit applications and resources, written for previous versions of OS/2, to be executed and address memory within the process address space.
OS/2 Version 2.0 allocates memory in multiples of 4KB; each 4KB unit is known as a page. An application may request larger memory objects, and may access and manipulate these objects as logical entities, but the operating system internally manages each page as a separate unit. This allows a more efficient virtual memory implementation, since individual pages may be swapped in and out of real storage, rather than entire memory objects. Page swapping is typically faster, especially when memory objects become very large.
OS/2 Version 2.0 allows 16-bit applications and resources to execute within any process, since all processes execute in memory within the 16:16 addressing scheme limit of 512MB. OS/2 Version 2.0 also allows interaction between 16-bit and 32-bit modules within a process, and provides address conversion, parameter conversion, stack alignment, etc., between 16:16 and 0:32 addressing schemes using thunk layers.
The memory management implementation under OS/2 Version 2.0, therefore, provides access to larger amounts of physical and virtual storage in a more efficient manner than previous versions of OS/2, and removes many of the constraints imposed by previous versions. At the same time, it maintains compatibility with 16-bit applications and resources.