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

Contient les statistiques d'un tas donné.

<a id="syntaxSection" />

## Syntaxe

```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" />

### Membres

*dwSize*<br />Type : ULONG

La taille de la structure `XMEM_HEAP_STATISTICS`. Ce membre doit être défini avant de passer la structure à [XMemGetAllocationStatistics](/fr-CA/reference/system/xmem/functions/xmemgetallocationstatistics).

*dwPageGroupSize*<br />Type : ULONG

À déterminer

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

La taille maximale, en octets, que le tas a atteinte.

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

La quantité de mémoire libre, en octets, qui n'a jamais été utilisée. Elle est réinitialisée après chaque appel visant à modifier la valeur d'hystérésis ou à préallouer des pages. Si ce nombre n'est pas nul, cela signifie que l'hystérésis est définie trop haut, car des pages allouées n'ont jamais été utilisées.

*dwAllocationCount*<br />Type : ULONG

Le nombre de fois où ce tas a appelé le noyau pour demander de la mémoire.

*dwFreeCount*<br />Type : ULONG

Le nombre de fois où ce tas a appelé le noyau pour lui rendre de la mémoire.

<a id="remarksSection" />

## Remarques

Cette structure est utilisée par [XMemGetAllocationStatistics](/fr-CA/reference/system/xmem/functions/xmemgetallocationstatistics) pour fournir des statistiques sur un tas donné. Pour plus d'informations sur la mémoire graphique, consultez [Vue d'ensemble de la mémoire graphique pour le GDK](/fr-CA/build/core-features/graphics/graphics-memory-overview).

L'exemple suivant montre comment utiliser la fonction `XMemGetAllocationStatistics` pour remplir cette structure avec les statistiques de la mémoire « garlic » (à écriture combinée pour le CPU et non cohérente pour le GPU).

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

<a id="requirementsSection" />

## Configuration requise

**En-tête :** xmem.h

**Plateformes prises en charge :** consoles de la famille XBOX One et consoles XBOX Series

<a id="seealsoSection" />

## Voir aussi

[Diagnostics et suivi de la mémoire](/fr-CA/build/console-features/memory/system-memory-diagnostics)<br />[XALLOC\_ATTRIBUTES](/fr-CA/reference/system/xmem/structs/xalloc_attributes)<br />[XMem](/fr-CA/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)
