MCPcopy Create free account
hub / github.com/RenderKit/oidn / FatalConditionHandler

Method FatalConditionHandler

external/catch.hpp:10817–10826  ·  view source on GitHub ↗

For MSVC, we reserve part of the stack memory for handling memory overflow structured exception.

Source from the content-addressed store, hash-verified

10815 // For MSVC, we reserve part of the stack memory for handling
10816 // memory overflow structured exception.
10817 FatalConditionHandler::FatalConditionHandler() {
10818 ULONG guaranteeSize = static_cast<ULONG>(minStackSizeForErrors);
10819 if (!SetThreadStackGuarantee(&guaranteeSize)) {
10820 // We do not want to fully error out, because needing
10821 // the stack reserve should be rare enough anyway.
10822 Catch::cerr()
10823 << "Failed to reserve piece of stack."
10824 << " Stack overflows will not be reported successfully.";
10825 }
10826 }
10827
10828 // We do not attempt to unset the stack guarantee, because
10829 // Windows does not support lowering the stack size guarantee.

Callers

nothing calls this directly

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected