### _heapmin -- Release Unused Memory from Default Heap

Format

>     #include <stdlib.h>  /* also in <malloc.h> */
>     int _heapmin(void);

Language Level: Extension
_heapmin returns all unused memory from the default runtime heap to the operating system.

Heap-specific, debug and tiled (for OS/2) versions of this function (_uheapmin, _debug_heapmin and _theapmin) are also available. _heapmin always operates on the default heap.

Note: If you create your own heap and make it the default heap, _heapmin calls the release function that you provide to return the memory.

Return Value
_heapmin returns 0 if successful; if not, it returns -1.

Example
This example shows how to use the _heapmin function.

    #include <stdio.h>
    #include <stdlib.h>

    int main(void)
    {
       if (_heapmin())
          printf("_heapmin failed.\n");
       else
          printf("_heapmin was successful.\n");
       return 0;

       /*****************************************
          The output should be:

          _heapmin was successful.
       *****************************************/
    }

Memory Management

_debug_heapmin -- Release Unused Memory in the Default Heap
_debug_theapmin -- Release Unused Tiled Memory
_debug_uheapmin -- Release Unused Memory in User Heap
_theapmin -- Release Unused Tiled Memory
_uheapmin -- Release Unused Memory in User Heap
<malloc.h>
<stdlib.h>