Commit 52b1457f authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Don't set the limit that triggers the next GC higher than the max

old space size.
Review URL: http://codereview.chromium.org/8491009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent cfc6f31e
......@@ -1254,7 +1254,8 @@ class Heap {
Max(old_gen_size + old_gen_size / divisor, kMinimumPromotionLimit);
limit += new_space_.Capacity();
limit *= old_gen_limit_factor_;
return limit;
intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
return Min(limit, halfway_to_the_max);
}
intptr_t OldGenAllocationLimit(intptr_t old_gen_size) {
......@@ -1263,7 +1264,8 @@ class Heap {
Max(old_gen_size + old_gen_size / divisor, kMinimumAllocationLimit);
limit += new_space_.Capacity();
limit *= old_gen_limit_factor_;
return limit;
intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
return Min(limit, halfway_to_the_max);
}
// Can be called when the embedding application is idle.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment