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

Unified Diff: src/heap.h

Issue 545026: Add some interfaces to the GC that allow us to reserve space. This is needed... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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 | « src/frames.cc ('k') | src/mark-compact.h » ('j') | src/spaces.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
===================================================================
--- src/heap.h (revision 3575)
+++ src/heap.h (working copy)
@@ -269,7 +269,7 @@
return reinterpret_cast<Address>(&always_allocate_scope_depth_);
}
static bool linear_allocation() {
- return linear_allocation_scope_depth_ != 0;
+ return linear_allocation_scope_depth_ != 0;
}
static Address* NewSpaceAllocationTopAddress() {
@@ -834,11 +834,15 @@
> old_gen_promotion_limit_;
}
+ static intptr_t OldGenerationSpaceAvailable() {
+ return old_gen_allocation_limit_ -
+ (PromotedSpaceSize() + PromotedExternalMemorySize());
+ }
+
// 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_;
+ return OldGenerationSpaceAvailable() < 0;
}
// Can be called when the embedding application is idle.
@@ -1052,9 +1056,9 @@
// Helper function used by CopyObject to copy a source object to an
// allocated target object and update the forwarding pointer in the source
// object. Returns the target object.
- static HeapObject* MigrateObject(HeapObject* source,
- HeapObject* target,
- int size);
+ static inline HeapObject* MigrateObject(HeapObject* source,
+ HeapObject* target,
Mads Ager (chromium) 2010/01/12 14:17:49 Missing space on this line and the next.
+ int size);
// Helper function that governs the promotion policy from new space to
// old. If the object's old address lies below the new space's age
« no previous file with comments | « src/frames.cc ('k') | src/mark-compact.h » ('j') | src/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698