Gets the number of bytes that survived the last full, blocking garbage collection and that are referenced by the current application domain.
HRESULT STDMETHODCALLTYPE GetCurrentSurvived( [in] DWORD dwAppDomainId, [out] ULONGLONG *pAppDomainBytesSurvived, [out] ULONGLONG *pTotalBytesSurvived);
[in] The ID of the requested application domain.
[out] A pointer to the number of bytes that survived after the last garbage collection that are held by this application domain. After a full collection, this number is accurate and complete. After an ephemeral collection, this number is potentially incomplete. This parameter can be
[out] A pointer to the total number of bytes that survived from the last garbage collection. After a full collection, this number represents the number of the bytes that are held in managed heaps. After an ephemeral collection, this number represents the number of bytes that are held live in ephemeral generations. This parameter can be
This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.
|S_OK||The method completed successfully.|
|COR_E_APPDOMAINUNLOADED||The application domain has been unloaded or does not exist.|
Statistics are updated only after a full, blocking garbage collection; that is, a collection that includes all generations and that stops the application while collection occurs. For example, the GC.Collect() method overload performs a full, blocking collection. Concurrent garbage collection occurs in the background and does not block the application.
GetCurrentSurvived method is the unmanaged equivalent of the managed AppDomain.MonitoringSurvivedMemorySize property.
Platforms: See System Requirements.
Library: Included as a resource in MSCorEE.dll
.NET Framework Versions: Available since 4