Skip to main content

XMEMFREE_ROUTINE callback

Defines the syntax of the memory de-allocation routines, XMemFree and XMemFreeDefault.

Syntax

Parameters

Address   _In_
Type: PVOID
The address of the memory to be freed. Attributes   _In_
Type: ULONGLONG
The attributes of the memory allocation. For more information, see XALLOC_ATTRIBUTES.

Return value

Type: VOID None.

Remarks

This function definition is used in the XMEM_ALLOCATION_HOOKS structure to define the XMemFree and XMemFreeDefault functions. Similarly, the XMEMALLOC_ROUTINE function definition is used to define the XMemAlloc and XMemAllocDefault functions.
Source code for the default implementation of XMemFree is installed as part of the Microsoft Game Development Kit (GDK). For more information, see the XMemFreeDefault function in \GXDK\gameKit\Source\amd64\heap.c.

Requirements

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

See also

Diagnostics and memory tracking
XMem
XMemFreeDefault
Last modified on August 20, 2026