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;
Members
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. |
Remarks
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.
Requirements
Platforms: Windows 2000, Windows XP, Windows Server 2003 family
Header: MSCorEE.idl
Library: MSCorEE.dll
.NET Framework Version: 2.0