> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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.

## Sintaxis

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

### 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](https://docs.xbox.com/es/reference/system/xmem/functions/xmemalloc_routine.md) y [XMemAlloc](https://docs.xbox.com/es/reference/system/xmem/functions/xmemalloc.md).

*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](https://docs.xbox.com/es/reference/system/xmem/functions/xmemfree_routine.md) y [XMemFree](https://docs.xbox.com/es/reference/system/xmem/functions/xmemfree.md).

## Comentarios

Esta estructura la usa la macro [XMEM\_SET\_ALLOCATION\_HOOKS](https://docs.xbox.com/es/reference/system/xmem/macros/xmem_set_allocation_hooks.md) 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](https://docs.xbox.com/es/build/core-features/graphics/graphics-memory-overview.md).

> [!NOTE]
>
> La función [XMemSetAllocationHooks](https://docs.xbox.com/es/reference/system/xmem/functions/xmemsetallocationhooks.md) 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.

## Requisitos

**Encabezado:** xmem.h

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

## Consulte también

[XMEM\_SET\_ALLOCATION\_HOOKS](https://docs.xbox.com/es/reference/system/xmem/macros/xmem_set_allocation_hooks.md)\
[XMEMALLOC\_ROUTINE](https://docs.xbox.com/es/reference/system/xmem/functions/xmemalloc_routine.md)\
[XMEMFREE\_ROUTINE](https://docs.xbox.com/es/reference/system/xmem/functions/xmemfree_routine.md)\
[XMem](https://docs.xbox.com/es/reference/system/xmem/xmem_members.md)


## Related topics

- [XMEM_SET_ALLOCATION_HOOKS](https://docs.xbox.com/es/reference/system/xmem/macros/xmem_set_allocation_hooks.md)
- [XMemSetAllocationHooks](https://docs.xbox.com/es/reference/system/xmem/functions/xmemsetallocationhooks.md)
- [XMemFreeDefault](https://docs.xbox.com/es/reference/system/xmem/functions/xmemfreedefault.md)
- [XMEMALLOC_ROUTINE callback](https://docs.xbox.com/es/reference/system/xmem/functions/xmemalloc_routine.md)
- [XMEMFREE_ROUTINE callback](https://docs.xbox.com/es/reference/system/xmem/functions/xmemfree_routine.md)
