Share via


RuntimeHelpers.ProbeForSufficientStack 메서드

정의

주의

The Constrained Execution Region (CER) feature is not supported.

사용자 코드에서 정해진 적당량의 스택 공간만 사용한다고 가정할 경우 다음 코드 블록 내에서 스택 오버플로가 발생할 수 없도록 특정한 스택 공간의 크기를 조사합니다. 이 메서드 대신 CER(제약이 있는 실행 영역)을 사용하는 것이 좋습니다.

public:
 static void ProbeForSufficientStack();
[System.Obsolete("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId="SYSLIB0004", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void ProbeForSufficientStack ();
[System.Security.SecurityCritical]
public static void ProbeForSufficientStack ();
public static void ProbeForSufficientStack ();
[<System.Obsolete("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId="SYSLIB0004", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ProbeForSufficientStack : unit -> unit
[<System.Security.SecurityCritical>]
static member ProbeForSufficientStack : unit -> unit
static member ProbeForSufficientStack : unit -> unit
Public Shared Sub ProbeForSufficientStack ()
특성

설명

이 메서드는 Microsoft SQL Server 및 Microsoft Exchange Server 같은 스택 오버플로에 복원력이 있는 호스트에서 실행할 때 CER(제한된 실행 지역) 인프라에서 사용됩니다. 이 메서드는 현재 x86 플랫폼에서 48KB의 스택 공간을 검색하지만 정확한 양은 시간이 지남에 따라 변경되고 다른 플랫폼에 따라 달라질 수 있습니다.

이 메서드는 컴파일러에서도 사용됩니다.

메서드를 ProbeForSufficientStack 사용하는 대신 표준 CER을 사용해야 합니다. 즉, 적당량의 스택 공간을 사용하려는 경우 또는/catchtry블록 바로 앞에 메서드를 RuntimeHelpers.PrepareConstrainedRegions 호출합니다.try/finally 재귀 메서드를 호출하거나 많은 스택 공간을 사용하려는 경우 메서드를 RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup 사용해야 합니다.

적용 대상