共用方式為


_heapmin

Releases unused heap memory to the operating system.

int_heapmin(void);

Routine Required Header Optional Headers Compatibility
_heapmin <malloc.h> <errno.h> Win NT

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

If successful, _heapmin returns 0; otherwise, the function returns –1 and sets errno to ENOSYS.

Remarks

The _heapmin function minimizes the heap by releasing unused heap memory to the operating system.

Note In Visual C++ Version 4.0, the underlying heap structure was moved to the C run-time libraries to support the new debugging features. As a result, the only Win32 platform that is supported by _heapmin is Windows NT. The function returns –1 and sets errno to ENOSYS, when it is called by any other Win32 platform.

Memory Allocation Routines

See Also   free, _heapadd, _heapchk, _heapset, _heapwalk, malloc