DosSubFreeMem frees a block of memory that was previously allocated by DosSubAllocMem.
cb should be a multiple of 8 bytes, otherwise it will be rounded up. The maximum value for the cb parameter is the size of the memory pool initialized by DosSubSetMem minus 64 bytes.
Note: DosAllocMem and DosAllocSharedMem both allocate a block of memory of the size requested rounded to the nearest page. On OS/2 Warp, the system allocates a 64K object without attributes on every allocation.
For example, for a DosAllocMem call with a size of 1, the following occurs:
Note:
When you allocate a memory object with the PAG_EXECUTE attribute, it is implied that this memory object also has the PAG_READ attribute. However, when querying the attributes of a memory object, you will get the following results: