IMalloc interface

Allocates, frees, and manages memory.

Methods

The IMalloc interface has these methods.

Method Description
IMalloc::Alloc Allocates a block of memory.
IMalloc::DidAlloc Determines whether this allocator was used to allocate the specified block of memory.
IMalloc::Free Frees a previously allocated block of memory.
IMalloc::GetSize Retrieves the size of a previously allocated block of memory.
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.
IMalloc::Realloc Changes the size of a previously allocated block of memory.

Requirements

   
Windows version Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]
Target Platform Windows
Header objidl.h (include ObjIdl.h)

See Also

CoGetMalloc

CoRegisterMallocSpy

CoRevokeMallocSpy

IMallocSpy