Skip to main content

XMEM_ALLOCATION_HOOKS

Represents the hooks to memory allocation and de-allocation functions for a title.

Syntax

Members

AllocRoutine
Type: PXMEMALLOC_ROUTINE
A pointer to the title’s allocation function. For more information about implementing an application-defined memory allocation function, see XMEMALLOC_ROUTINE and XMemAlloc. FreeRoutine
Type: PXMEMFREE_ROUTINE
A pointer to the title’s de-allocation function. For more information about implementing an application-defined memory de-allocation function, see XMEMFREE_ROUTINE and XMemFree.

Remarks

This structure is used by the XMEM_SET_ALLOCATION_HOOKS macro to register application-defined memory allocation and de-allocation functions for your title. For more information about graphics memory, see Graphics memory overview for the GDK.
The XMemSetAllocationHooks function is deprecated. Use this macro instead of the XMemSetAllocationHooks function to register your title’s memory allocation and de-allocation functions.

Requirements

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

See also

XMEM_SET_ALLOCATION_HOOKS
XMEMALLOC_ROUTINE
XMEMFREE_ROUTINE
XMem
Last modified on August 20, 2026