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

# XMemGetWin32HeapStatistics

> XMemGetWin32HeapStatistics

# XMemGetWin32HeapStatistics

获取给定堆的统计信息。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
BOOL XMemGetWin32HeapStatistics(
    _In_ HANDLE Heap,
    _Out_ PWIN32_HEAP_STATISTICS Statistics
    );
```

<a id="parametersSection" />

### 参数

*Heap*   \_In\_\
类型：HANDLE

要获取统计信息的堆句柄

*Statistics*   \_Out\_\
类型：PWIN32\_HEAP\_STATISTICS

指向用于包含统计信息的 [WIN32\_HEAP\_STATISTICS](/reference/system/xmem/structs/win32_heap_statistics) 结构的指针。

<a id="retvalSection" />

### 返回值

类型：BOOL

如果可以填充 [WIN32\_HEAP\_STATISTICS](/reference/system/xmem/structs/win32_heap_statistics) 结构，则返回 `TRUE`；否则返回 `FALSE`。

<a id="remarksSection" />

## 备注

此函数返回统计信息，例如 win32 堆中的提交大小。返回的提交大小是 win32 堆所消耗的总内存的估计值。

<a id="requirementsSection" />

## 要求

**标头：** xmem.h

**库：** xmem.lib

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

<a id="seealsoSection" />

## 请参阅

[诊断与内存跟踪](/build/console-features/memory/system-memory-diagnostics)\
[WIN32\_HEAP\_STATISTICS](/reference/system/xmem/structs/win32_heap_statistics)\
[XMem](/reference/system/xmem/xmem_members)


## Related topics

- [WIN32_HEAP_STATISTICS](/zh-CN/reference/system/xmem/structs/win32_heap_statistics.md)
- [XMemGetWin32HeapName](/zh-CN/reference/system/xmem/functions/xmemgetwin32heapname.md)
- [XMemSetWin32HeapName](/zh-CN/reference/system/xmem/functions/xmemsetwin32heapname.md)
- [XMemCreateWin32Heap](/zh-CN/reference/system/xmem/functions/xmemcreatewin32heap.md)
- [XMemSetWin32HeapTrackingHooks](/zh-CN/reference/system/xmem/functions/xmemsetwin32heaptrackinghooks.md)
