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

Unified Diff: src/objects.h

Issue 1392823003: [heap] Decrease large object limit for regular heap objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/heap/spaces-inl.h ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 7dbc9f41213960045901a72e1792b283d3a3daee..880fb1c806532bef5c40523962d23273083cb149 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -10048,9 +10048,14 @@ class JSArray: public JSObject {
static const int kLengthOffset = JSObject::kHeaderSize;
static const int kSize = kLengthOffset + kPointerSize;
- // Note that Page::kMaxRegularHeapObjectSize puts a limit on
- // permissible values (see the DCHECK in heap.cc).
- static const int kInitialMaxFastElementArray = 100000;
+ // 128 * KB is the Page::kMaxRegularHeapObjectSize defined in spaces.h which
+ // we do not want to include in objects.h
+ // Note that Page::kMaxRegularHeapObjectSize has to be in sync with
+ // kInitialMaxFastElementArray which is checked in a DCHECK in heap.cc.
+ static const int kInitialMaxFastElementArray =
+ (128 * KB * (i::kPointerSize / 4) - FixedArray::kHeaderSize - kSize -
+ AllocationMemento::kSize) /
+ kPointerSize;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray);
« no previous file with comments | « src/heap/spaces-inl.h ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698