定义用于垃圾回收堆分析信息的传输缓冲区。
Note
此 API 最初旨在供运行时内部使用。 尽管现在支持第三方使用,但我们建议尽量使用 ICorDebug 和 ICorProfiler API。
Syntax
struct DacpGcHeapAnalyzeData
: ZeroInit<DacpGcHeapAnalyzeData>
{
CLRDATA_ADDRESS heapAddr; // Only filled in in server mode, otherwise NULL
CLRDATA_ADDRESS internal_root_array;
ULONG64 internal_root_array_index;
BOOL heap_analyze_success;
// Use this for workstation mode (DacpGcHeapDat.bServerMode==FALSE).
HRESULT Request(ISOSDacInterface *sos)
{
return sos->GetHeapAnalyzeStaticData(this);
}
// Use this for Server mode, as there are multiple heaps,
// and you need to pass a heap address in addr.
HRESULT Request(ISOSDacInterface *sos, CLRDATA_ADDRESS addr)
{
return sos->GetHeapAnalyzeData(addr, this);
}
};
Members
| 成员 | 说明 |
|---|---|
heapAddr |
GC 堆的地址。 此成员仅在服务器模式下填充;否则,为 NULL. |
internal_root_array |
内部根数组的地址。 |
internal_root_array_index |
内部根数组中的索引。 |
heap_analyze_success |
一个值,该值指示堆分析是否成功。 |
Request |
通过调用 ISOSDacInterface::GetHeapAnalyzeStaticData 或 ISOSDacInterface::GetHeapAnalyzeData. 填充结构。 |
Remarks
此结构位于运行时内,不会通过任何标头或库文件公开。 若要使用它,请定义上面指定的结构。
要求
平台:请参阅系统要求。
页眉: 没有
图书馆: 没有
.NET Framework 版本:自 4.7 起可用