Chromium Code Reviews| Index: src/heap.h |
| =================================================================== |
| --- src/heap.h (revision 9578) |
| +++ src/heap.h (working copy) |
| @@ -1031,6 +1031,9 @@ |
| } |
| Object* global_contexts_list() { return global_contexts_list_; } |
| + // Number of mark-sweeps. |
| + int ms_count() { return ms_count_; } |
| + |
| // Iterates over all roots in the heap. |
| void IterateRoots(ObjectVisitor* v, VisitMode mode); |
| // Iterates over all strong roots in the heap. |
| @@ -1243,16 +1246,20 @@ |
| } |
| intptr_t OldGenPromotionLimit(intptr_t old_gen_size) { |
| + static int divisor = 3; |
|
Vyacheslav Egorov (Chromium)
2011/10/11 13:55:29
it does not have to be static. just have int divis
Sven Panne
2011/10/11 14:02:15
*const* int divisor = ... ;-)
|
| + if (FLAG_stress_compaction) divisor = 10; |
| intptr_t limit = |
| - Max(old_gen_size + old_gen_size / 3, kMinimumPromotionLimit); |
| + Max(old_gen_size + old_gen_size / divisor, kMinimumPromotionLimit); |
| limit += new_space_.Capacity(); |
| limit *= old_gen_limit_factor_; |
| return limit; |
| } |
| intptr_t OldGenAllocationLimit(intptr_t old_gen_size) { |
| + static int divisor = 2; |
|
Vyacheslav Egorov (Chromium)
2011/10/11 13:55:29
ditto
Sven Panne
2011/10/11 14:02:15
ditto
|
| + if (FLAG_stress_compaction) divisor = 8; |
| intptr_t limit = |
| - Max(old_gen_size + old_gen_size / 2, kMinimumAllocationLimit); |
| + Max(old_gen_size + old_gen_size / divisor, kMinimumAllocationLimit); |
| limit += new_space_.Capacity(); |
| limit *= old_gen_limit_factor_; |
| return limit; |