> ## 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.

# XMemFreeDefault

> XMemFreeDefault

# XMemFreeDefault

The default memory deallocation routine.

## Syntax

```cpp theme={null}
VOID XMemFreeDefault(
                PVOID Address,
                ULONGLONG Attributes
)
```

### Parameters

*Address*    Type: PVOID

\[in] The address of the block to deallocate, must have been previously allocated using XMemAllocDefault.

*Attributes*\
Type: ULONGLONG

\[in] Attributes of the allocation. Refer to [XALLOC\_ATTRIBUTES](/reference/system/xmem/structs/xalloc_attributes)

**Remarks**

Two default functions are exported by the system: [*XMemAllocDefault*](/reference/system/xmem/functions/xmemallocdefault)
and *XmemFreeDefault*.
These represent the initial values of the allocation hooks. If titles choose not to provide their own allocation hooks, these system default allocators will be used instead. If titles desire to provide allocation hooks for the sake of tracking, but do not wish to implement their own allocator, they can call into the default allocator directly.

**See also**

[*xmem\_set\_allocation\_hooks*](/reference/system/xmem/macros/xmem_set_allocation_hooks)

[*xmem\_allocation\_hooks*](/reference/system/xmem/structs/xmem_allocation_hooks)


## Related topics

- [XMEMFREE_ROUTINE callback](/reference/system/xmem/functions/xmemfree_routine.md)
- [XMEMALLOC_ROUTINE callback](/reference/system/xmem/functions/xmemalloc_routine.md)
- [XMemSetAllocationHooks](/reference/system/xmem/functions/xmemsetallocationhooks.md)
- [game_chat_free_memory_callback](/reference/chat/gamechat2/functions/game_chat_free_memory_callback.md)
- [HCMemGetFunctions](/reference/live/httpclient/httpclient/functions/hcmemgetfunctions.md)
