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

# XMemMakeTag

> XMemMakeTag

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

## Syntax

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

### 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 (\*).

### Return value

Type: ULONGLONG

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

## 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](https://docs.xbox.com/reference/system/xmem/functions/xmemallocatephysicalpages.md) and [XMemVirtualAlloc](https://docs.xbox.com/reference/system/xmem/functions/xmemvirtualalloc.md) 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](https://docs.xbox.com/reference/system/xmem/structs/xmem_basic_information.md) structure, returned by [XMemVirtualQuery](https://docs.xbox.com/reference/system/xmem/functions/xmemvirtualquery.md). For more information about working with the memory manager, see [Working with the Microsoft GDK Game OS memory manager](https://docs.xbox.com/build/console-features/memory/system-memory-working.md).

## Requirements

**Header:** xmem.h

**Library:** xmem.lib

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

## See also

[Memory](https://docs.xbox.com/build/console-features/memory/system-memory-overview.md)\
[XMem](https://docs.xbox.com/reference/system/xmem/xmem_members.md)


## Related topics

- [XMemSetOption](https://docs.xbox.com/reference/system/xmem/functions/xmemsetoption.md)
- [Make package (makepkg.exe)](https://docs.xbox.com/build/core-features/common/packaging/deployment/makepkg.md)
- [XMemVirtualQuery](https://docs.xbox.com/reference/system/xmem/functions/xmemvirtualquery.md)
- [PFTagModel](https://docs.xbox.com/services/playfab/api-references/c/pftypes/structs/pftagmodel.md)
- [Economy v2 Catalog Content Types, Tags, & Properties](https://docs.xbox.com/services/playfab/economy-monetization/economy-v2/catalog/content-types-tags-and-properties.md)
