Called just after invoking IMalloc::GetSize.
ULONG PostGetSize(
ULONG cbActual, //Actual size of the allocation
BOOL fSpyed //Whether the allocation was done while a spy was
//active
);
The same value returned by IMalloc::GetSize, which is the size of the allocated memory block in bytes.
The size determined by IMalloc::GetSize is the value returned by the Win32 function HeapSize. On Windows NT, this is the size originally requested. On Windows 95, memory allocations are done on eight-byte boundaries. For example, a memory allocation request of 27 bytes on Windows NT would return an allocation of 32 bytes and GetSize would return 27. On Windows 95, the same request would return an allocation of 28 bytes and GetSize would return 28. Implementers of IMallocSpy::PostGetSize cannot assume, for example, that if cbActual is sizeof(debug_header), that the value is the actual size of the user's allocation.
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.
IMalloc::GetSize, IMallocSpy::PreGetSize, CoRegisterMallocSpy, CoRevokeMallocSpy