For memory objects that have a fixed size, such as internal application storage, control blocks and most instance data, memory objects should be committed immediately upon allocation, allowing the application to access the memory object without the inconvenience and additional overhead of explicitly committing the storage at a later time.
Storage for a memory object may be committed using the PAG_COMMIT flag in the DosAllocMem() function call used to allocate the memory object, as shown in Figure "Committing Storage During Allocation". The above example creates a 72KB memory object in a similar manner to that shown in Figure "Allocating Memory in OS/2 Version 2.0", but commits the storage during allocation, so that is immediately available for use by the application.