IMalloc::HeapMinimize

Minimizes the heap as much as possible by releasing unused memory to the operating system, coalescing adjacent free blocks and committing free pages.

void HeapMinimize();

Remarks

Calling IMalloc::HeapMinimize is useful when an application has been running for some time and the heap may be fragmented.

QuickInfo

  Windows NT: Use version 3.1 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in objidl.h.

See Also

IMalloc::Alloc, IMalloc::Free, IMalloc::Realloc