Chromium Code Reviews| Index: src/heap/mark-compact.cc |
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
| index d161b1853d8afb662193e416dfa471380f93164b..3664525c0a1d7ba7fae2b77437b34eeab15b413d 100644 |
| --- a/src/heap/mark-compact.cc |
| +++ b/src/heap/mark-compact.cc |
| @@ -702,8 +702,12 @@ void MarkCompactCollector::CollectEvacuationCandidates(PagedSpace* space) { |
| int candidate_count = 0; |
| int total_live_bytes = 0; |
| - bool reduce_memory = |
| - heap()->ShouldReduceMemory() || heap()->HasLowAllocationRate(); |
| + // The minimum about of memory to make aggresive compaction worthwhile. |
|
Hannes Payer (out of office)
2015/10/01 14:36:07
amount
|
| + const int kMinPagesToReduceMemory = 16; |
| + |
| + bool reduce_memory = heap()->ShouldReduceMemory() || |
| + (heap()->HasLowAllocationRate() && |
|
Hannes Payer (out of office)
2015/10/01 14:36:07
As you suggested offline, we can remove the alloca
|
| + number_of_pages > kMinPageToReduceMemory); |
| if (FLAG_manual_evacuation_candidates_selection) { |
| for (size_t i = 0; i < pages.size(); i++) { |
| Page* p = pages[i].second; |