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

# XMem

> XMem

# XMem

Material de referência para APIs de memória.

## Funções

| Função | Descrição |
| - | - |
| [Retorno de chamada PHEAP\_TRACK\_ALLOC\_ROUTINE](/pt-BR/reference/system/xmem/functions/pheap_track_alloc_routine) | Representa uma função de retorno de chamada de rastreamento para alocação de heap. |
| [Retorno de chamada PHEAP\_TRACK\_FREE\_ROUTINE](/pt-BR/reference/system/xmem/functions/pheap_track_free_routine) | Representa uma função de retorno de chamada de rastreamento para desalocação de heap. |
| [Retorno de chamada PHEAP\_TRACK\_REALLOC\_ROUTINE](/pt-BR/reference/system/xmem/functions/pheap_track_realloc_routine) | Representa uma função de retorno de chamada de rastreamento para realocação de heap. |
| [XMemAlloc](/pt-BR/reference/system/xmem/functions/xmemalloc) | Representa uma função de retorno de chamada de alocação de memória definida pelo aplicativo que substitui o alocador de memória padrão. |
| [Retorno de chamada XMEMALLOC\_ROUTINE](/pt-BR/reference/system/xmem/functions/xmemalloc_routine) | Define a sintaxe das rotinas de alocação de memória, [XMemAlloc](/pt-BR/reference/system/xmem/functions/xmemalloc) e `XMemAllocDefault`. |
| [XMemAllocatePhysicalPages](/pt-BR/reference/system/xmem/functions/xmemallocatephysicalpages) | Aloca páginas físicas contíguas para o processo especificado. |
| [XMemAllocDefault](/pt-BR/reference/system/xmem/functions/xmemallocdefault) | A rotina padrão de alocação de memória. |
| [XMemCreateWin32Heap](/pt-BR/reference/system/xmem/functions/xmemcreatewin32heap) | Cria um heap do Win32. |
| [XMemFree](/pt-BR/reference/system/xmem/functions/xmemfree) | Define a rotina de desalocação de memória. |
| [Retorno de chamada XMEMFREE\_ROUTINE](/pt-BR/reference/system/xmem/functions/xmemfree_routine) | Define a sintaxe das rotinas de desalocação de memória, [XMemFree](/pt-BR/reference/system/xmem/functions/xmemfree) e `XMemFreeDefault`. |
| [XMemFreeDefault](/pt-BR/reference/system/xmem/functions/xmemfreedefault) | A rotina padrão de desalocação de memória. |
| [XMemFreePhysicalPages](/pt-BR/reference/system/xmem/functions/xmemfreephysicalpages) | Devolve ao gerenciador de memória as páginas alocadas com [XMemAllocatePhysicalPages](/pt-BR/reference/system/xmem/functions/xmemallocatephysicalpages). |
| [XMemGetAllocationHysteresis](/pt-BR/reference/system/xmem/functions/xmemgetallocationhysteresis) | Obtém a quantidade de histerese de um determinado heap, arredondada para cima até um limite de alocação interno. |
| [XMemGetAllocationStatistics](/pt-BR/reference/system/xmem/functions/xmemgetallocationstatistics) | Obtém as estatísticas de um determinado heap. |
| [XMemGetPhysicalMemoryLayout](/pt-BR/reference/system/xmem/functions/xmemgetphysicalmemorylayout) | Obtém o layout da memória física. |
| [XMemGetTitleHeap](/pt-BR/reference/system/xmem/functions/xmemgettitleheap) | Retorna um ponteiro para o heap do título. |
| [XMemGetWin32HeapName](/pt-BR/reference/system/xmem/functions/xmemgetwin32heapname) | Documentação da API XMemGetWin32HeapName |
| [XMemGetWin32HeapStatistics](/pt-BR/reference/system/xmem/functions/xmemgetwin32heapstatistics) | Obtém as estatísticas de um determinado heap do Win32. |
| [XMemGetWorkingSetStatistics](/pt-BR/reference/system/xmem/functions/xmemgetworkingsetstatistics) | Fornece detalhes do uso exato da memória em um processo de título. |
| [XMemGetWriteWatch](/pt-BR/reference/system/xmem/functions/xmemgetwritewatch) | Documentação da API XMemGetWriteWatch |
| [XMemIsToolsMemAvailable](/pt-BR/reference/system/xmem/functions/xmemistoolsmemavailable) | Indica se a memória de ferramentas está disponível. |
| [XMemMakeTag](/pt-BR/reference/system/xmem/functions/xmemmaketag) | Cria uma marca de 24 bits com base em um código de quatro caracteres. |
| [XMemMapPhysicalPages](/pt-BR/reference/system/xmem/functions/xmemmapphysicalpages) | Mapeia páginas alocadas por [XMemAllocatePhysicalPages](/pt-BR/reference/system/xmem/functions/xmemallocatephysicalpages) no espaço de endereço virtual. |
| [XMemMapPhysicalPagesScatter](/pt-BR/reference/system/xmem/functions/xmemmapphysicalpagesscatter) | Mapeia páginas físicas na memória virtual. |
| [XMemPreallocateFreeSpace](/pt-BR/reference/system/xmem/functions/xmempreallocatefreespace) | Aloca páginas livres para um heap até o valor de histerese dele. |
| [XMemResetWriteWatch](/pt-BR/reference/system/xmem/functions/xmemresetwritewatch) | Documentação da API XMemResetWriteWatch |
| [XMemResumeWriteWatch](/pt-BR/reference/system/xmem/functions/xmemresumewritewatch) | Informa ao XMem que o chamador está pronto para retomar o rastreamento de gravação depois que ele foi suspenso por uma captura de GPU do PIX. |
| [XMemSetAllocationHooks](/pt-BR/reference/system/xmem/functions/xmemsetallocationhooks) | Usada pelos títulos para registrar ganchos de alocação de memória. |
| [XMemSetAllocationHysteresis](/pt-BR/reference/system/xmem/functions/xmemsetallocationhysteresis) | Define a quantidade de histerese de um determinado heap, arredondada para cima até um limite de alocação interno (4 MB). |
| [XMemSetOption](/pt-BR/reference/system/xmem/functions/xmemsetoption) | Define uma configuração para o XMem. |
| [XMemSetWin32HeapName](/pt-BR/reference/system/xmem/functions/xmemsetwin32heapname) | Documentação da API XMemSetWin32HeapName |
| [XMemSetWin32HeapTrackingHooks](/pt-BR/reference/system/xmem/functions/xmemsetwin32heaptrackinghooks) | Define funções de retorno de chamada de rastreamento para alocação, realocação e desalocação de memória de heaps do Win32. |
| [XMemTransferMemory](/pt-BR/reference/system/xmem/functions/xmemtransfermemory) | Transfere memória entre partições. |
| [XMemVirtualAlloc](/pt-BR/reference/system/xmem/functions/xmemvirtualalloc) | Reserva, confirma ou altera o estado de uma região de páginas no espaço de endereço virtual do processo de chamada. |
| [XMemVirtualQuery](/pt-BR/reference/system/xmem/functions/xmemvirtualquery) | Recupera informações sobre um intervalo de páginas no espaço de endereço virtual do processo de chamada. |

## Estruturas

| Estrutura | Descrição |
| - | - |
| [WIN32\_HEAP\_STATISTICS](/pt-BR/reference/system/xmem/structs/win32_heap_statistics) | Contém estatísticas de um determinado heap. |
| [XALLOC\_ATTRIBUTES](/pt-BR/reference/system/xmem/structs/xalloc_attributes) | Contém valores que descrevem os atributos de uma alocação de memória. |
| [XMEM\_ALLOCATION\_HOOKS](/pt-BR/reference/system/xmem/structs/xmem_allocation_hooks) | Representa os ganchos para as funções de alocação e desalocação de memória de um título. |
| [XMEM\_BASIC\_INFORMATION](/pt-BR/reference/system/xmem/structs/xmem_basic_information) | Contém informações sobre um intervalo de páginas no espaço de endereço virtual de um processo. |
| [XMEM\_HEAP\_STATISTICS](/pt-BR/reference/system/xmem/structs/xmem_heap_statistics) | Contém estatísticas de um determinado heap. |
| [XMEM\_OPTION](/pt-BR/reference/system/xmem/structs/xmem_option) | Especifica o tipo e o valor de uma opção de memória. |
| [XMEM\_PHYSICAL\_MEMORY\_LAYOUT](/pt-BR/reference/system/xmem/structs/xmem_physical_memory_layout) | Contém detalhes do layout da memória física do console atual. |
| [XMEM\_WORKING\_SET\_STATISTICS](/pt-BR/reference/system/xmem/structs/xmem_working_set_statistics) | Contém detalhes do uso exato da memória em um processo de título de jogo. |

## Enumerações

| Enumeração | Descrição |
| - | - |
| [XALLOC\_ALLOCATOR\_IDS](/pt-BR/reference/system/xmem/enums/xalloc_allocator_ids) | Define o intervalo do conjunto de IDs para diferentes tipos de alocadores usados pelas rotinas de alocação de memória. |
| [XMEM\_OPTIONS](/pt-BR/reference/system/xmem/enums/xmem_options) | Os valores de XMEM\_OPTIONS são usados como o parâmetro Option da struct [XMEM\_OPTION](/pt-BR/reference/system/xmem/structs/xmem_option). |
| [XMEM\_TRANSFER\_TYPE](/pt-BR/reference/system/xmem/enums/xmem_transfer_type) | Indica de onde e para onde transferir memória. |

## Macros

| Macro | Descrição |
| - | - |
| [XMEM\_SET\_ALLOCATION\_HOOKS](/pt-BR/reference/system/xmem/macros/xmem_set_allocation_hooks) | Usada pelos títulos para registrar ganchos de alocação de memória. |

## Documentação conceitual

* [Sistema de memória do XBOX One](/pt-BR/build/console-features/memory/system-memory-overview)
* [Analisando alocações de memória](/pt-BR/build/console-features/memory/system-memory-diagnostics)
* [Gerenciamento de memória (Guia de portabilidade do Microsoft Game Development Kit (GDK) para títulos do XBOX)](/pt-BR/build/console-features/porting-from-xbox-one-era/porting-guide-for-existing-era#MEMMGMT)

## Confira também

[Referência da API do sistema](/pt-BR/reference/system/gc-reference-system-toc)


## Related topics

- [XMEM_OPTIONS](/reference/system/xmem/enums/xmem_options.md)
- [XMEM_ALLOCATION_HOOKS](/reference/system/xmem/structs/xmem_allocation_hooks.md)
