Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: src/heap.h

Issue 305413002: Grow big old generation slower. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 979b41e77ca1ea2bb8a8c3b9009ca8cfe41b68f8..37da91c9078fc9126cdbc560850f40f9f210f939 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1087,9 +1087,19 @@ class Heap {
700 * kPointerMultiplier;
intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size) {
- intptr_t limit = FLAG_stress_compaction
- ? old_gen_size + old_gen_size / 10
- : old_gen_size * old_space_growing_factor_;
+ intptr_t limit;
+ if (FLAG_stress_compaction) {
+ limit = old_gen_size + old_gen_size / 10;
+ } else if (old_gen_size < max_old_generation_size_/8) {
ulan 2014/06/05 14:13:12 Nit: spaces around "/"
Hannes Payer (out of office) 2014/06/05 14:46:23 Done.
+ limit = old_gen_size * 4;
+ } else if (old_gen_size < max_old_generation_size_/4) {
+ limit = old_gen_size * 1.5;
+ } else if (old_gen_size < max_old_generation_size_/2) {
+ limit = old_gen_size * 1.2;
+ } else {
+ limit = old_gen_size * 1.1;
+ }
+
limit = Max(limit, kMinimumOldGenerationAllocationLimit);
limit += new_space_.Capacity();
intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
@@ -1498,11 +1508,6 @@ class Heap {
intptr_t max_executable_size_;
intptr_t maximum_committed_;
- // The old space growing factor is used in the old space heap growing
- // strategy. The new old space size is the current old space size times
- // old_space_growing_factor_.
- int old_space_growing_factor_;
-
// For keeping track of how much data has survived
// scavenge since last new space expansion.
int survived_since_last_expansion_;
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698