Skip to main content

PHEAP_TRACK_REALLOC_ROUTINE callback

Represents a tracking callback function for heap reallocation.

Syntax

Parameters

Heap   
Type: HANDLE
The handle to the heap from which the memory block was reallocated. Flags   
Type: DWORD
The heap reallocation options passed to HeapReAlloc. Size   
Type: SIZE_T
The new size of the memory block, in bytes. OldAddr   
Type: PVOID
The original address of the memory block that HeapReAlloc reallocated. NewAddr   
Type: PVOID
The new address of the reallocated memory block.

Return value

Type: void None.

Remarks

This callback function can be implemented to track when a memory block is reallocated from a Win32 heap. Once implemented, you must register the implemented callback function by calling XMemSetWin32HeapTrackingHooks. The callback function is then invoked after HeapReAlloc is called to reallocate a previously-allocated memory block from a Win32 heap. For more information about implementing this callback function, see the Remarks section of XMemSetWin32HeapTrackingHooks.

Requirements

Header: xmem.h Library: xmem.lib Supported platforms: XBOX One family consoles and XBOX Series consoles

See also

Diagnostics and memory tracking
XMemCreateWin32Heap
PHEAP_TRACK_ALLOC_ROUTINE
PHEAP_TRACK_FREE_ROUTINE
XMem
Last modified on August 20, 2026