RuntimeHelpers.ProbeForSufficientStack 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
주의
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을 사용해야 합니다. 즉, 적당량의 스택 공간을 사용하려는 경우 메서드를 RuntimeHelpers.PrepareConstrainedRegions 바로 앞에 호출하거나try/finally차단합니다.try/catch 재귀 메서드를 호출하거나 스택 공간을 많이 사용하려는 경우 이 메서드를 RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup 사용해야 합니다.