Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ICLRAppDomainResourceMonitor::GetCurrentSurvived Method

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);
dwAppDomainId

[in] The ID of the requested application domain.

pAppDomainBytesSurvived

[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 null.

pRuntimeBytesSurvived

[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 null.

This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.

HRESULT

Description

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.

The GetCurrentSurvived method is the unmanaged equivalent of the managed AppDomain.MonitoringSurvivedMemorySize property.

Platforms: See .NET Framework System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: 4.5, 4

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.