> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XMEM_ALLOCATION_HOOKS

> XMEM_ALLOCATION_HOOKS

# XMEM\_ALLOCATION\_HOOKS

Representa los enlaces (hooks) a las funciones de asignación y desasignación de memoria de un título.

<a id="syntaxSection" />

## Sintaxis

```cpp theme={null}
typedef struct XMEM_ALLOCATION_HOOKS {  
    PXMEMALLOC_ROUTINE AllocRoutine;  
    PXMEMFREE_ROUTINE FreeRoutine;  
} XMEM_ALLOCATION_HOOKS  
```

<a id="membersSection" />

### Miembros

*AllocRoutine*\
Tipo: PXMEMALLOC\_ROUTINE

Un puntero a la función de asignación del título. Para obtener más información sobre cómo implementar una función de asignación de memoria definida por la aplicación, consulte [XMEMALLOC\_ROUTINE](/reference/system/xmem/functions/xmemalloc_routine) y [XMemAlloc](/reference/system/xmem/functions/xmemalloc).

*FreeRoutine*\
Tipo: PXMEMFREE\_ROUTINE

Un puntero a la función de desasignación del título. Para obtener más información sobre cómo implementar una función de desasignación de memoria definida por la aplicación, consulte [XMEMFREE\_ROUTINE](/reference/system/xmem/functions/xmemfree_routine) y [XMemFree](/reference/system/xmem/functions/xmemfree).

<a id="remarksSection" />

## Comentarios

Esta estructura la usa la macro [XMEM\_SET\_ALLOCATION\_HOOKS](/reference/system/xmem/macros/xmem_set_allocation_hooks) para registrar las funciones de asignación y desasignación de memoria definidas por la aplicación para su título. Para obtener más información sobre la memoria de gráficos, consulte [Información general sobre la memoria de gráficos para el GDK](/build/core-features/graphics/graphics-memory-overview).

<Note>La función [XMemSetAllocationHooks](/reference/system/xmem/functions/xmemsetallocationhooks) está en desuso. Use esta macro en lugar de la función `XMemSetAllocationHooks` para registrar las funciones de asignación y desasignación de memoria de su título.</Note>

<a id="requirementsSection" />

## Requisitos

**Encabezado:** xmem.h

**Plataformas compatibles:** consolas de la familia XBOX One y consolas XBOX Series

<a id="seealsoSection" />

## Consulte también

[XMEM\_SET\_ALLOCATION\_HOOKS](/reference/system/xmem/macros/xmem_set_allocation_hooks)\
[XMEMALLOC\_ROUTINE](/reference/system/xmem/functions/xmemalloc_routine)\
[XMEMFREE\_ROUTINE](/reference/system/xmem/functions/xmemfree_routine)\
[XMem](/reference/system/xmem/xmem_members)


## Related topics

- [XMemSetAllocationHooks](/es/reference/system/xmem/functions/xmemsetallocationhooks.md)
- [XMemFreeDefault](/es/reference/system/xmem/functions/xmemfreedefault.md)
- [XMEMALLOC_ROUTINE callback](/es/reference/system/xmem/functions/xmemalloc_routine.md)
- [XMEMFREE_ROUTINE callback](/es/reference/system/xmem/functions/xmemfree_routine.md)
- [XMemSetWin32HeapTrackingHooks](/es/reference/system/xmem/functions/xmemsetwin32heaptrackinghooks.md)
