IMalloc

The OLE implementation of IMalloc allocates, frees, and manages memory.

The OLE libraries and object handlers call the methods of the IMalloc implementation to manage memory. Those implementing object handlers should call CoGetMalloc to get a pointer to the IMalloc implementation to handle task memory management needs.

The IMalloc methods Alloc, Free, and Realloc are similar to the C library functions malloc, free, and realloc. For debugging, refer to the functions CoRegisterMallocSpy and CoRevokeMallocSpy.

Methods in Vtable Order

IUnknown Methods
Description
QueryInterface
Returns pointers to supported interfaces.
AddRef
Increments the reference count.
Release
Decrements the reference count.

IMalloc Methods
Description
Alloc
Allocates a block of memory.
Free
Frees a previously allocated block of memory.
Realloc
Changes the size of a previously allocated block of memory.
GetSize
Returns the size in bytes of a previously allocated block of memory
DidAlloc
Determines if this instance of IMalloc was used to allocate the specified block of memory.
HeapMinimize
Minimizes the heap by releasing unused memory to the operating system.

See Also

CoGetMalloc, CoRegisterMallocSpy, CoRevokeMallocSpy

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database