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

> XMEM_HEAP_STATISTICS

# XMEM\_HEAP\_STATISTICS

Contém estatísticas de um determinado heap.

<a id="syntaxSection" />

## Sintaxe

```cpp theme={null}
typedef struct XMEM_HEAP_STATISTICS {  
    ULONG dwSize;  
    ULONG dwPageGroupSize;
    SIZE_T dwMaximumAllocatedSize;  
    SIZE_T dwMinimumFreeDepth;  
    ULONG dwAllocationCount;  
    ULONG dwFreeCount;  
} XMEM_HEAP_STATISTICS  
```

<a id="membersSection" />

### Membros

*dwSize*<br />Tipo: ULONG

O tamanho da estrutura `XMEM_HEAP_STATISTICS`. Esse membro deve ser definido antes de passar a estrutura para [XMemGetAllocationStatistics](/pt-BR/reference/system/xmem/functions/xmemgetallocationstatistics).

*dwPageGroupSize*<br />Tipo: ULONG

A definir

*dwMaximumAllocatedSize*<br />Tipo: SIZE\_T

O tamanho máximo, em bytes, que o heap já atingiu.

*dwMinimumFreeDepth*<br />Tipo: SIZE\_T

A quantidade de memória livre que nunca foi utilizada, em bytes. Ela é redefinida após cada chamada para alterar a quantidade de histerese ou para pré-alocar páginas. Se esse número for diferente de zero, significa que a histerese está definida com um valor muito alto, porque há páginas alocadas que nunca foram usadas.

*dwAllocationCount*<br />Tipo: ULONG

O número de vezes que esse heap chamou o kernel solicitando memória.

*dwFreeCount*<br />Tipo: ULONG

O número de vezes que esse heap chamou o kernel para devolver memória.

<a id="remarksSection" />

## Comentários

Essa estrutura é usada por [XMemGetAllocationStatistics](/pt-BR/reference/system/xmem/functions/xmemgetallocationstatistics) para fornecer estatísticas sobre um determinado heap. Para obter mais informações sobre memória gráfica, consulte [Visão geral da memória gráfica do GDK](/pt-BR/build/core-features/graphics/graphics-memory-overview).

O exemplo a seguir ilustra como usar a função `XMemGetAllocationStatistics` para preencher essa estrutura com estatísticas da memória "garlic" (de combinação de gravação na CPU e não coerente na GPU).

```cpp theme={null}
XMEM_HEAP_STATISTICS statistics;
statistics.dwSize = sizeof( statistics );
BOOL success = XMemGetAllocationStatistics(XALLOC_MEMTYPE_GRAPHICS_WRITECOMBINE, TRUE, &statistics);
```

<a id="requirementsSection" />

## Requisitos

**Cabeçalho:** xmem.h

**Plataformas compatíveis:** consoles da família XBOX One e consoles XBOX Series

<a id="seealsoSection" />

## Confira também

[Diagnóstico e rastreamento de memória](/pt-BR/build/console-features/memory/system-memory-diagnostics)<br />[XALLOC\_ATTRIBUTES](/pt-BR/reference/system/xmem/structs/xalloc_attributes)<br />[XMem](/pt-BR/reference/system/xmem/xmem_members)


## Related topics

- [XMemGetWin32HeapStatistics](/reference/system/xmem/functions/xmemgetwin32heapstatistics.md)
- [WIN32_HEAP_STATISTICS](/reference/system/xmem/structs/win32_heap_statistics.md)
