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

# XMemMakeTag

> XMemMakeTag

# XMemMakeTag

Creates a 24-bit tag based on a four-character code.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
ULONGLONG XMemMakeTag(  
         UINT32 Tag  
)  
```

<a id="parametersSection" />

### Parameters

*Tag*   \_In\_\
Type: UINT32

The four-character code used to create the 24-bit tag. The code supports lowercase and uppercase letters (a-z and A-Z), digits (0-9), and the dollar symbol (\$). An invalid character input is read back as an asterisk (\*).

<a id="retvalSection" />

### Return value

Type: ULONGLONG

24-bit tag code, placed in the upper 24 bits of a 64-bit ULONGLONG.

<a id="remarksSection" />

## Remarks

This function is a helper function that you can use to incorporate an optional 4-character tag, using a bitwise-OR combination, into the `XMemFlags` parameter for the [XMemAllocatePhysicalPages](/reference/system/xmem/functions/xmemallocatephysicalpages) and [XMemVirtualAlloc](/reference/system/xmem/functions/xmemvirtualalloc) functions. The optional 4-character tag is applied to the range of pages identified by these functions. You can retrieve that tag as part of the `XMemFlags` member in the [XMEM\_BASIC\_INFORMATION](/reference/system/xmem/structs/xmem_basic_information) structure, returned by [XMemVirtualQuery](/reference/system/xmem/functions/xmemvirtualquery). For more information about working with the memory manager, see [Working with the Microsoft GDK Game OS memory manager](/build/console-features/memory/system-memory-working).

<a id="requirementsSection" />

## Requirements

**Header:** xmem.h

**Library:** xmem.lib

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## See also

[Memory](/build/console-features/memory/system-memory-overview)\
[XMem](/reference/system/xmem/xmem_members)


## Related topics

- [XMemSetOption](/reference/system/xmem/functions/xmemsetoption.md)
- [Make package (makepkg.exe)](/build/core-features/common/packaging/deployment/makepkg.md)
- [XMemVirtualQuery](/reference/system/xmem/functions/xmemvirtualquery.md)
- [PFTagModel](/services/playfab/api-references/c/pftypes/structs/pftagmodel.md)
- [PFSegmentsGetPlayerTagsResult](/services/playfab/api-references/c/pfsegmentstypes/structs/pfsegmentsgetplayertagsresult.md)
