XMEMALLOC_ROUTINE callback
Defines the syntax of the memory allocation routines, XMemAlloc andXMemAllocDefault.
Syntax
Parameters
Size _In_Type: SIZE_T The size of the memory block that is being requested, in bytes. Attributes _In_
Type: ULONGLONG The attributes of the memory allocation. For more information, see XALLOC_ATTRIBUTES.
Return value
Type: PVOID A pointer to the allocated memory, if successful; otherwise,NULL.
Remarks
This function definition is used in the XMEM_ALLOCATION_HOOKS structure to define the XMemAlloc andXMemAllocDefault functions. Similarly, the XMEMFREE_ROUTINE function definition is used to define the XMemFree and XMemFreeDefault functions.
Source code for the default implementation of
XMemAlloc is installed as part of the Microsoft Game Development Kit (GDK). For more information, see the XMemAllocDefault function in \GXDK\gameKit\Source\amd64\heap.c.Requirements
Header: xmem.h Library: xmem.lib Supported platforms: XBOX One family consoles and XBOX Series consolesSee also
Diagnostics and memory trackingXMem
XMemAllocDefault
