[ Home |
Alpha index |
Topic index |
Tutorials |
Download |
Feedback ]
The OS/2 API Project
DosSubUnsetMem
[ Syntax |
Params |
Returns |
Include |
Usage |
Structs |
Gotchas |
Code |
Also ]
Syntax
rc = DosSubUnsetMem( pOffset );
Parameters
- PVOID pOffset (input)
- This is the offset of the memory pool which we no longer need.
Returns
- APIRET rc
- The following values can be returned
-
0 | NO_ERROR |
532 | ERROR_DOSSUB_CORRUPTED |
Include Info
#define INCL_DOSMEMMGR
#include <os2.h>
#include <bsememf.h>
Usage Explanation
DosSubUnsetMem is used to terminate a memory pool. It is used to allow the suballocation
function to release resources it used to manage the suballocation of the memory block. All
calls to DosSubSetMem should be followed by a call to
DosSubUnsetMem. All calls to DosSubUnsetMem must occur before the memory block is freed.
Relevant Structures
Gotchas
Sample Code
#define INCL_DOSMEMMGR
#include
#include
PVOID Offset; /* Offset of the memory pool which we will terminate. */
APIRET rc; /* Just to take care of the return code. */
/* Offset should be set to the offset of the memory pool which we are */
/* about to terminate. */
rc = DosSubUnsetMem( Offset);
if (rc != 0)
{
/* We have an error we must take care of. */
}
See Also
DosSubAllocMem,
DosSubFreeMem,
DosSubSetMem
Author
Stefan Mars -
mars@lysator.liu.se
Additions
Last modified March 16/1996
Please send all errors, comments, and suggestions to:
timur@vnet.ibm.com
The OS/2 API Project |
DosSubUnsetMem |