Chromium Code Reviews| Index: src/heap/gc-idle-time-handler.cc |
| diff --git a/src/heap/gc-idle-time-handler.cc b/src/heap/gc-idle-time-handler.cc |
| index 8def9005e647b344685050b96c19bac4fa1e3e98..311e39d39c7e8d3080dc55a6f9e161b423525c44 100644 |
| --- a/src/heap/gc-idle-time-handler.cc |
| +++ b/src/heap/gc-idle-time-handler.cc |
| @@ -78,9 +78,12 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms, |
| } |
| } |
| if (heap_state.incremental_marking_stopped) { |
| + const size_t kSmallHeap = 2 * kPointerSize * MB; |
|
Hannes Payer (out of office)
2014/09/11 09:21:59
please move this constant to the header file.
|
| if (idle_time_in_ms >= EstimateMarkCompactTime( |
| heap_state.size_of_objects, |
| - heap_state.mark_compact_speed_in_bytes_per_ms)) { |
| + heap_state.mark_compact_speed_in_bytes_per_ms) || |
| + (heap_state.size_of_objects < kSmallHeap && |
| + heap_state.contexts_disposed > 0)) { |
| // If there are no more than two GCs left in this idle round and we are |
| // allowed to do a full GC, then make those GCs full in order to compact |
| // the code space. |