.NET API 448,984 bytes
LibrarySettings
using System;
namespace DotNext
{
internal static class LibrarySettings
{
private const string StackallocThresholdEnvar =
"DOTNEXT_STACK_ALLOC_THRESHOLD";
private const int DefaultStackallocThreshold =
511;
internal static int StackallocThreshold {
get {
if (
int.
TryParse(
Environment.
GetEnvironmentVariable(
"DOTNEXT_STACK_ALLOC_THRESHOLD"),
out int result) &&
result >=
16) {
if ((
result &
1) !=
0)
return result;
result =
checked(
result -
1);
return result;
}
result =
511;
return result;
}
}
}
}