Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 163983e

Browse files
mikednjkotas
authored andcommitted
Default gcAllowVeryLargeObjects to true (#8853)
* Default gcAllowVeryLargeObjects to true * Update tests for gcAllowVeryLargeObjects These 2 tests appear to rely on gcAllowVeryLargeObjects being false in that they expect an exception to be thrown when allocating a very large array. Increase the number of array elements so that an OutOfMemoryException is always thown no matter what value gcAllowVeryLargeObjects has. 81*98*58*36*74*4 is 4906065024 which is larger than 2^32, the theoretical array length limit.
1 parent 01f8e7d commit 163983e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/inc/clrconfigvalues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(UNSUPPORTED_GCprnLvl, W("GCprnLvl"), "Spe
338338
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_GCRetainVM, W("GCRetainVM"), 0, "When set we put the segments that should be deleted on a standby list (instead of releasing them back to the OS) which will be considered to satisfy new segment requests (note that the same thing can be specified via API which is the supported way)")
339339
RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(UNSUPPORTED_GCSegmentSize, W("GCSegmentSize"), "Specifies the managed heap segment size")
340340
RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(UNSUPPORTED_GCLOHCompact, W("GCLOHCompact"), "Specifies the LOH compaction mode")
341-
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_gcAllowVeryLargeObjects, W("gcAllowVeryLargeObjects"), 0, "allow allocation of 2GB+ objects on GC heap")
341+
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_gcAllowVeryLargeObjects, W("gcAllowVeryLargeObjects"), 1, "allow allocation of 2GB+ objects on GC heap")
342342
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_GCStress, W("GCStress"), 0, "trigger GCs at regular intervals", CLRConfig::REGUTIL_default)
343343
CONFIG_DWORD_INFO_EX(INTERNAL_GcStressOnDirectCalls, W("GcStressOnDirectCalls"), 0, "whether to trigger a GC on direct calls", CLRConfig::REGUTIL_default)
344344
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_GCStressStart, W("GCStressStart"), 0, "start GCStress after N stress GCs have been attempted")

tests/src/JIT/Regression/VS-ia64-JIT/V2.0-RTM/b539509/b539509.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static ulong Static1(TF param1)
133133
do
134134
{
135135
bool[, , , ,][,] local8 = (new bool[81u, 98u, ((uint)(58.0f)), ((uint)(36.0f)),
136-
74u][,]);
136+
74u*4u][,]);
137137
while ((((uint)(local5)) != 4u))
138138
{
139139
if (Convert.ToBoolean((local5 + local5)))

tests/src/JIT/jit64/regress/vsw/539509/test1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public static ulong Static1(TF param1)
162162
do
163163
{
164164
bool[,,,,][,] local8 = (new bool[81u, 98u, ((uint)(58.0f)), ((uint)(36.0f)),
165-
74u][,]);
165+
74u*4u][,]);
166166
while ((((uint)(local5)) != 4u))
167167
{
168168
if (Convert.ToBoolean((local5 + local5)))

0 commit comments

Comments
 (0)