IMallocSpy::PostAlloc method

Performs operations required after calling IMalloc::Alloc.

Syntax


void* PostAlloc(
  [invoid *pActual
);

Parameters

pActual [in]

The pointer returned from Alloc.

Return value

This method returns a pointer to the beginning of the block of memory actually allocated. This pointer is also returned to the caller of Alloc. If debug information is written at the front of the caller's allocation, this should be a forward offset from pActual. The value is the same as pActual if debug information is appended or if no debug information is attached.

Remarks

When a spy object implementing IMallocSpy is registered using the CoRegisterMallocSpy function, COM calls PostAlloc after any call to Alloc. It takes as input a pointer to the allocation done by the call to Alloc, and returns a pointer to the beginning of the total allocation, which could include a forward offset from the other value if IMallocSpy::PreAlloc was implemented to attach debug information to the allocation in this way. If not, the same pointer is returned and also becomes the return value to the caller of Alloc.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IMallocSpy is defined as 0000001d-0000-0000-C000-000000000046

See also

IMalloc::Alloc
IMallocSpy
IMallocSpy::PreAlloc

 

 

Show: