Export (0) Print
Expand All

EMemoryCriticalLevel Enumeration

Contains values that indicate the impact of a failure when a specific memory allocation has been requested but cannot be satisfied.

typedef enum {
    eTaskCritical      = 0,
    eAppDomainCritical = 1,
    eProcessCritical   = 2
} EMemoryCriticalLevel;

Member

Description

eAppDomainCritical

Indicates that the allocation is critical for executing managed code in the domain that has requested the allocation. If memory cannot be allocated, the CLR cannot guarantee that the domain is still usable. The host decides what action to take when the allocation cannot be satisfied. It can instruct the CLR to abort the AppDomain automatically, or allow it to keep running by calling methods on ICLRPolicyManager.

eProcessCritical

Indicates that the allocation is critical to the execution of managed code in the process. This value is used during startup and when running finalizers. If memory cannot be allocated, the CLR cannot operate in the process. If the allocation fails, the CLR is effectively disabled. All subsequent calls into the CLR fail with HOST_E_CLRNOTAVAILABLE.

eTaskCritical

Indicates that the allocation is critical to running the task that has requested the allocation. If memory cannot be allocated, the CLR cannot guarantee that the task can be executed. In the event of failure, the CLR raises a ThreadAbortException on the physical operation system thread.

The memory allocation methods defined in the IHostMemoryManager and IHostMAlloc interfaces take a parameter of this type. Depending upon the severity of a failure, a host can decide whether to fail the allocation request immediately or to wait until it can be satisfied.

Platforms: See .NET Framework System Requirements.

Header: MSCorEE.h

Library: MSCorEE.dll

.NET Framework Versions: 4.6 Preview, 4.5.2, 4.5.1, 4.5, 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

Show:
© 2015 Microsoft