IMalloc Interface

The IMalloc interface is an abstraction of familiar memory-allocation primitives that fit into the COM interface model. Like all other interface[s], it is derived from IUnknown and correspondingly includes the AddRef, Release, and QueryInterface member functions. The first three IMalloc-specific functions in this interface are merely simple abstractions of the familiar C library functions malloc, realloc, and free.


[
    local,
    object,
    uuid(00000002-0000-0000-C000-000000000046)
]
interface IMalloc : IUnknown {
...void * ...Alloc([in] ULONG cb);
...void *...Realloc([in] void * pv, [in] ULONG cb);
...void......Free([in] void* pv);
...ULONG...GetSize([in] void * pv);
...int......DidAlloc([in] void * pv);
...void......HeapMinimize(void);
...};