| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 100da7d766e86c8f57b7712b6216d0b72fc39dfa..9141cb9785ab8ca49ebecce9c07a6175f1d379e7 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -10093,9 +10093,13 @@ 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;
|
| + // 600 * 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 =
|
| + (600 * KB - FixedArray::kHeaderSize - kSize - AllocationMemento::kSize) /
|
| + kPointerSize;
|
|
|
| private:
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray);
|
|
|