summaryrefslogtreecommitdiff
path: root/src/gc
diff options
context:
space:
mode:
authorAndy Hanson <anhans@microsoft.com>2019-03-22 13:14:40 -0700
committerGitHub <noreply@github.com>2019-03-22 13:14:40 -0700
commit513ccfc64a398055e7e7afc380d578cd2237b885 (patch)
tree8117fb11d0186b9224a610ca5cc97338ef8d4fc7 /src/gc
parent5d57b87227b7fd116735edf9f5f75b3154953d8e (diff)
parentcc14e6cecf6984c991fe906c9fe4b327b4f93f96 (diff)
downloadcoreclr-513ccfc64a398055e7e7afc380d578cd2237b885.tar.gz
coreclr-513ccfc64a398055e7e7afc380d578cd2237b885.tar.bz2
coreclr-513ccfc64a398055e7e7afc380d578cd2237b885.zip
Merge pull request #23366 from andy-ms/heap_hard_limit
Don't compact LOH just because a heap_hard_limit exists
Diffstat (limited to 'src/gc')
-rw-r--r--src/gc/gc.cpp8
-rw-r--r--src/gc/gcpriv.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp
index 9c82c11536..2e5ea1b26b 100644
--- a/src/gc/gc.cpp
+++ b/src/gc/gc.cpp
@@ -5854,7 +5854,7 @@ void gc_mechanisms::init_mechanisms()
promotion = FALSE;//TRUE;
compaction = TRUE;
#ifdef FEATURE_LOH_COMPACTION
- loh_compaction = gc_heap::should_compact_loh();
+ loh_compaction = gc_heap::loh_compaction_requested();
#else
loh_compaction = FALSE;
#endif //FEATURE_LOH_COMPACTION
@@ -21372,10 +21372,10 @@ retry:
}
}
-BOOL gc_heap::should_compact_loh()
+BOOL gc_heap::loh_compaction_requested()
{
// If hard limit is specified GC will automatically decide if LOH needs to be compacted.
- return (heap_hard_limit || loh_compaction_always_p || (loh_compaction_mode != loh_compaction_default));
+ return (loh_compaction_always_p || (loh_compaction_mode != loh_compaction_default));
}
inline
@@ -21545,7 +21545,7 @@ BOOL gc_heap::plan_loh()
void gc_heap::compact_loh()
{
- assert (should_compact_loh());
+ assert (loh_compaction_requested() || heap_hard_limit);
generation* gen = large_object_generation;
heap_segment* start_seg = heap_segment_rw (generation_start_segment (gen));
diff --git a/src/gc/gcpriv.h b/src/gc/gcpriv.h
index 8a7dfdf6b8..9f863e6bb0 100644
--- a/src/gc/gcpriv.h
+++ b/src/gc/gcpriv.h
@@ -2228,7 +2228,7 @@ protected:
BOOL loh_object_p (uint8_t* o);
PER_HEAP_ISOLATED
- BOOL should_compact_loh();
+ BOOL loh_compaction_requested();
// If the LOH compaction mode is just to compact once,
// we need to see if we should reset it back to not compact.