Chromium Code Reviews| Index: src/heap.cc |
| =================================================================== |
| --- src/heap.cc (revision 8902) |
| +++ src/heap.cc (working copy) |
| @@ -62,12 +62,6 @@ |
| namespace internal { |
| -static const intptr_t kMinimumPromotionLimit = |
| - 2 * (Page::kPageSize > MB ? Page::kPageSize : MB); |
| -static const intptr_t kMinimumAllocationLimit = |
| - 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); |
| - |
| - |
| static Mutex* gc_initializer_mutex = OS::CreateMutex(); |
| @@ -121,6 +115,7 @@ |
| #endif // DEBUG |
| old_gen_promotion_limit_(kMinimumPromotionLimit), |
| old_gen_allocation_limit_(kMinimumAllocationLimit), |
| + old_gen_limit_factor_(1), |
| external_allocation_limit_(0), |
| amount_of_external_allocated_memory_(0), |
| amount_of_external_allocated_memory_at_last_global_gc_(0), |
| @@ -731,13 +726,11 @@ |
| intptr_t old_gen_size = PromotedSpaceSize(); |
| old_gen_promotion_limit_ = |
| - old_gen_size + |
| - Max(kMinimumPromotionLimit, old_gen_size / 3) + |
| - new_space()->Capacity(); |
| + Max(new_space()->Capacity() + old_gen_size + kMinimumPromotionLimit, |
| + new_space()->Capacity() + PromotionFactor(old_gen_size)); |
| old_gen_allocation_limit_ = |
| - old_gen_size + |
| - Max(kMinimumAllocationLimit, old_gen_size / 2) + |
| - new_space()->Capacity(); |
| + Max(new_space()->Capacity() + old_gen_size + kMinimumAllocationLimit, |
| + new_space()->Capacity() + AllocationFactor(old_gen_size)); |
|
Vyacheslav Egorov (Chromium)
2011/08/11 15:11:34
maybe instead of XFactor you should call it XDelta
Erik Corry
2011/08/11 16:09:08
This function does not exist any more.
|
| if (high_survival_rate_during_scavenges && |
| IsStableOrIncreasingSurvivalTrend()) { |
| @@ -747,9 +740,12 @@ |
| // In this case we aggressively raise old generation memory limits to |
| // postpone subsequent mark-sweep collection and thus trade memory |
| // space for the mutation speed. |
| - old_gen_promotion_limit_ *= 2; |
| - old_gen_allocation_limit_ *= 2; |
| + old_gen_limit_factor_ = 2; |
| + } else { |
| + old_gen_limit_factor_ = 1; |
| } |
| + old_gen_promotion_limit_ *= old_gen_limit_factor_; |
| + old_gen_allocation_limit_ *= old_gen_limit_factor_; |
| old_gen_exhausted_ = false; |
| } else { |
| @@ -4250,6 +4246,7 @@ |
| old_gen_promotion_limit_); |
| PrintF("old_gen_allocation_limit_ %" V8_PTR_PREFIX "d\n", |
| old_gen_allocation_limit_); |
| + PrintF("old_gen_limit_factor_ %d\n", old_gen_limit_factor_); |
| PrintF("\n"); |
| PrintF("Number of handles : %d\n", HandleScope::NumberOfHandles()); |