RuntimeHelpers.EnsureSufficientExecutionStack 메서드

정의

남아 있는 스택 공간이 평균적인 .NET 함수를 실행할 정도로 충분히 큰지 확인합니다.

public:
 static void EnsureSufficientExecutionStack();
public static void EnsureSufficientExecutionStack ();
[System.Security.SecurityCritical]
public static void EnsureSufficientExecutionStack ();
static member EnsureSufficientExecutionStack : unit -> unit
[<System.Security.SecurityCritical>]
static member EnsureSufficientExecutionStack : unit -> unit
Public Shared Sub EnsureSufficientExecutionStack ()
특성

예외

사용 가능한 스택 공간은 평균 .NET 함수를 실행하기에 충분하지 않습니다.

설명

EnsureSufficientExecutionStack 는 예외가 발생하고 복구 작업을 수행할 수 있는 충분한 공간을 유지하는 인위적으로 제한된 스택에 대한 정보를 제공합니다. 공용 언어 런타임에서 인공 스택 제한을 선택하여 예외를 안전하게 throw할 수 있는 충분한 공간을 유지합니다.

이 메서드는 바인딩되지 않은 재귀의 결과로 스택 오버플로가 발생할 수 있는 경우에 유용합니다. 다른 개발 시나리오에서도 안전하게 사용할 수 있지만 컴파일러 서비스 시나리오에서 사용하기 위한 것입니다.

스택 공간이 충분하면 예외가 throw되지 않으며 대부분의 .NET 형식 및 멤버를 계속 호출할 수 있습니다.

참고

이 메서드는 CER(제한된 실행 영역) 지원의 일부가 아니며 메서드와 RuntimeHelpers.ProbeForSufficientStack 혼동해서는 안 됩니다.

적용 대상