Committing Storage During Allocation

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                     */
            PAG_COMMIT);    /* Commit storage immediately             */

This example shows the use of the PAG_COMMIT flag with the DosAllocMem() function.


[Back: Allocating Memory in OS/2 Version 2.0]
[Next: Using a Guard Page With a Memory Object]