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

Unified Diff: src/heap.h

Issue 7737024: Speed up incremental marking if the heap size doubled (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 3 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/incremental-marking.h » ('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 9135)
+++ src/heap.h (working copy)
@@ -1209,16 +1209,18 @@
MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(int length,
PretenureFlag pretenure);
+ inline intptr_t PromotedTotalSize() {
+ return PromotedSpaceSize() + PromotedExternalMemorySize();
+ }
+
// 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.
inline bool OldGenerationPromotionLimitReached() {
- return (PromotedSpaceSize() + PromotedExternalMemorySize())
- > old_gen_promotion_limit_;
+ return PromotedTotalSize() > old_gen_promotion_limit_;
}
inline intptr_t OldGenerationSpaceAvailable() {
- return old_gen_allocation_limit_ -
- (PromotedSpaceSize() + PromotedExternalMemorySize());
+ return old_gen_allocation_limit_ - PromotedTotalSize();
}
static const intptr_t kMinimumPromotionLimit = 5 * Page::kPageSize;
@@ -1305,8 +1307,7 @@
inline bool NextGCIsLikelyToBeFull() {
if (FLAG_gc_global) return true;
- intptr_t total_promoted =
- PromotedSpaceSize() + PromotedExternalMemorySize();
+ intptr_t total_promoted = PromotedTotalSize();
intptr_t adjusted_promotion_limit =
old_gen_promotion_limit_ - new_space_.Capacity();
« no previous file with comments | « no previous file | src/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698