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

Unified Diff: src/heap.h

Issue 8657: Check the growth of the old generation before expanding the paged... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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
===================================================================
--- src/heap.h (revision 631)
+++ src/heap.h (working copy)
@@ -744,6 +744,20 @@
// Allocate unitialized fixed array (pretenure == NON_TENURE).
static Object* AllocateRawFixedArray(int length);
+ // True if we have reached the allocation limit in the old generation that
+ // should force the next GC (caused normally) to be a full one.
+ static bool OldGenerationPromotionLimitReached() {
+ return (PromotedSpaceSize() + PromotedExternalMemorySize())
+ > old_gen_promotion_limit_;
+ }
+
+ // True if we have reached the allocation limit in the old generation that
+ // should artificially cause a GC right now.
+ static bool OldGenerationAllocationLimitReached() {
+ return (PromotedSpaceSize() + PromotedExternalMemorySize())
+ > old_gen_allocation_limit_;
+ }
+
private:
static int semispace_size_;
static int initial_semispace_size_;
@@ -785,9 +799,16 @@
static bool disallow_allocation_failure_;
#endif // DEBUG
- // Promotion limit that trigger a global GC
- static int promoted_space_limit_;
+ // Limit that triggers a global GC on the next (normally caused) GC. This
+ // is checked when we have already decided to do a GC to help determine
+ // which collector to invoke.
+ static int old_gen_promotion_limit_;
+ // Limit that triggers a global GC as soon as is reasonable. This is
+ // checked before expanding a paged space in the old generation and on
+ // every allocation in large object space.
+ static int old_gen_allocation_limit_;
+
// The amount of external memory registered through the API kept alive
// by global handles
static int amount_of_external_allocated_memory_;
« 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