Revision: 9892
Author: [email protected]
Date: Mon Nov 7 02:35:24 2011
Log: Don't set the limit that triggers the next GC higher than the max
old space size.
Review URL: http://codereview.chromium.org/8491009
http://code.google.com/p/v8/source/detail?r=9892
Modified:
/branches/bleeding_edge/src/heap.h
=======================================
--- /branches/bleeding_edge/src/heap.h Thu Nov 3 03:36:55 2011
+++ /branches/bleeding_edge/src/heap.h Mon Nov 7 02:35:24 2011
@@ -1254,7 +1254,8 @@
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 @@
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.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev