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

# WIN32_HEAP_STATISTICS

> WIN32_HEAP_STATISTICS

# WIN32\_HEAP\_STATISTICS

Contains statistics for a given heap.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
typedef struct _XMEM_WIN32_HEAP_STATISTICS {
    SIZE_T SegmentCommitSize;
    SIZE_T LargeAllocCommitSize;
    SIZE_T reserved[6];
} WIN32_HEAP_STATISTICS, *PWIN32_HEAP_STATISTICS;
```

<a id="membersSection" />

### Members

*SegmentCommitSize*\
Type: SIZE\_T

The total commit size of the segment backed portion of the Win32 heap.

*LargeAllocCommitSize*\
Type: SIZE\_T

The total commit size for large allocations that are not cached by the segment heap.

*reserved*\
Type: SIZE\_T

Reserved for future use.

<a id="remarksSection" />

## Remarks

This structure is used by [XMemGetWin32HeapStatistics](/reference/system/xmem/functions/xmemgetwin32heapstatistics) to provide statistics about a given Win32 heap.

The Win32 heap services allocations either through cached memory in the "segment backed" portion of the heap or by direct calls to VirtualAlloc on behalf of the calling code.  SegmentCommitSize tracks the total commit that is owned by the segment backed portion of the heap.  LargeAllocCommitSize tracks the total commit that is used by allocations that are serviced directly by VirtualAlloc.  The sum of both of these fields provides an estimation of the memory in use by a Win32 heap.

<a id="requirementsSection" />

## Requirements

**Header:** xmem.h

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

<a id="seealsoSection" />

## See also

[Diagnostics and memory tracking](/build/console-features/memory/system-memory-diagnostics)\
[XMemGetWin32HeapStatistics](/reference/system/xmem/functions/xmemgetwin32heapstatistics)\
[XMem](/reference/system/xmem/xmem_members)


## Related topics

- [XMemGetWin32HeapStatistics](/reference/system/xmem/functions/xmemgetwin32heapstatistics.md)
- [XMemCreateWin32Heap](/reference/system/xmem/functions/xmemcreatewin32heap.md)
- [XMemSetWin32HeapName](/reference/system/xmem/functions/xmemsetwin32heapname.md)
- [XMemGetWin32HeapName](/reference/system/xmem/functions/xmemgetwin32heapname.md)
- [XMemSetWin32HeapTrackingHooks](/reference/system/xmem/functions/xmemsetwin32heaptrackinghooks.md)
