Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index f1f9c36040fe9490ce62beb24d458560312737f3..b24b0b3608344ffba6177e42df6edf3c02f217e2 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -1585,6 +1585,11 @@ class Heap { |
intptr_t limit = |
Max(old_gen_size + old_gen_size / divisor, kMinimumPromotionLimit); |
limit += new_space_.Capacity(); |
+ // TODO(hpayer): Can be removed when when pretenuring is supported for all |
+ // allocation sites. |
+ if (IsHighSurvivalRate() && IsStableOrIncreasingSurvivalTrend()) { |
+ limit *= 2; |
+ } |
intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; |
return Min(limit, halfway_to_the_max); |
} |
@@ -1595,6 +1600,11 @@ class Heap { |
intptr_t limit = |
Max(old_gen_size + old_gen_size / divisor, kMinimumAllocationLimit); |
limit += new_space_.Capacity(); |
+ // TODO(hpayer): Can be removed when when pretenuring is supported for all |
+ // allocation sites. |
+ if (IsHighSurvivalRate() && IsStableOrIncreasingSurvivalTrend()) { |
+ limit *= 2; |
+ } |
intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; |
return Min(limit, halfway_to_the_max); |
} |