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

# PFMemoryHooks

> Struct encapsulating memory hooks.

Struct encapsulating memory hooks.

## Syntax

```cpp theme={null}
typedef struct PFMemoryHooks {  
    PFMemAllocFunction* alloc;  
    PFMemFreeFunction* free;  
} PFMemoryHooks;  
```

### Members

**`alloc`**   PFMemAllocFunction\*

Custom allocation hook.

**`free`**   PFMemFreeFunction\*

Custom free hook.

## Remarks

Both hooks must be set at the same time.

## Requirements

**Header:** PFPlatform.h

## See also

[PFPlatform members](/services/playfab/api-references/c/pfplatform/pfplatform_members)


## Related topics

- [PFMemSetFunctions](/services/playfab/api-references/c/pfplatform/functions/pfmemsetfunctions.md)
- [Services C API overview - PFPlatform.h](/services/playfab/api-references/c/pfplatform/pfplatform_members.md)
- [PFMemGetFunctions](/services/playfab/api-references/c/pfplatform/functions/pfmemgetfunctions.md)
- [Memory management in the PlayFab Unified SDK](/services/playfab/sdks/unified-sdk/memory-management.md)
- [PlayFab SDK Products](/services/playfab/sdks/sdk-products.md)
