Allocating Memory in OS/2 Version 2.0

PVOID  pObject;             /* 32-bit linear pointer to memory object */

DosAllocMem(&pObject,       /* Allocate memory object                 */
            73727,          /* Size of memory object                  */
            PAG_READ |      /* Allow read access                      */
            PAG_WRITE);     /* Allow write access                     */

This example shows the use of the DosAllocMem() function to allocate a single 72KB memory object.


[Back: Allocating Memory in Previous Versions of OS/2]
[Next: Committing Storage During Allocation]