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

Unified Diff: src/heap/heap.h

Issue 2223493002: [heap] Use smaller minimum allocation limit growing step when optimizing for memory usage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 4 years, 4 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/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index f39b89393346a148abac7c9283f09f695311ad41..e15c1f37e77dfa3dd43b61ed0c2125e93c871c7c 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -519,9 +519,6 @@ class Heap {
};
typedef List<Chunk> Reservation;
- static const intptr_t kMinimumOldGenerationAllocationLimit =
- 8 * (Page::kPageSize > MB ? Page::kPageSize : MB);
-
static const int kInitalOldGenerationLimitFactor = 2;
#if V8_OS_ANDROID
@@ -1803,6 +1800,15 @@ class Heap {
void SetOldGenerationAllocationLimit(intptr_t old_gen_size, double gc_speed,
double mutator_speed);
+ intptr_t MinimumAllocationLimitGrowingStep() {
+ const double kRegularAllocationLimitGrowingStep = 8;
+ const double kLowMemoryAllocationLimitGrowingStep = 2;
+ intptr_t limit = (Page::kPageSize > MB ? Page::kPageSize : MB);
+ return limit * (ShouldOptimizeForMemoryUsage()
+ ? kLowMemoryAllocationLimitGrowingStep
+ : kRegularAllocationLimitGrowingStep);
+ }
+
// ===========================================================================
// Idle notification. ========================================================
// ===========================================================================
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698