提供記憶體回收堆積的一般相關資訊,包括其是否可以列舉。Provides general information about the garbage collection heap, including whether it is enumerable.


typedef struct _COR_HEAPINFO {  
    BOOL areGCStructuresValid;
    DWORD pointerSize;
    DWORD numHeaps;  
    BOOL concurrent;
    CorDebugGCType gcType;


memberMember 描述Description
areGCStructuresValid true 如果垃圾收集結構有效且可以列舉堆積,否則為 falsetrue if garbage collection structures are valid and the heap can be enumerated; otherwise, false.
pointerSize 目標架構上指標的大小(以位元組為單位)。The size, in bytes, of pointers on the target architecture.
numHeaps 進程中的邏輯垃圾收集堆積數目。The number of logical garbage collection heaps in the process.
concurrent TRUE 如果啟用並行 (背景) 垃圾收集,則為,否則為 FALSETRUE if concurrent (background) garbage collection is enabled; otherwise, FALSE.
gcType CorDebugGCType列舉的成員,指出垃圾收集行程是否正在工作站或伺服器上執行。A member of the CorDebugGCType enumeration that indicates whether the garbage collector is running on a workstation or a server.


COR_HEAPINFO 由呼叫 ICorDebugProcess5:: GetGCHeapInformation 方法來傳回結構的實例。An instance of the COR_HEAPINFO structure is returned by calling the ICorDebugProcess5::GetGCHeapInformation method.

列舉垃圾收集堆積上的物件之前,您必須一律檢查 areGCStructuresValid 欄位,確定堆積處於可列舉的狀態。Before enumerating objects on the garbage collection heap, you must always check the areGCStructuresValid field to ensure that the heap is in an enumerable state. 如需詳細資訊,請參閱 ICorDebugProcess5:: GetGCHeapInformation 方法。For more information, see the ICorDebugProcess5::GetGCHeapInformation method.


平台: 請參閱 系統需求Platforms: See System Requirements.

標頭: CorDebug.idl、CorDebug.hHeader: CorDebug.idl, CorDebug.h

程式庫: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 4.5 起可用Available since 4.5.NET Framework Versions: 自 4.5 起可用Available since 4.5

另請參閱See also