This sets the limit to 128M elements on all platforms. Before allocating a large array may
cause an OutOfMemory on x64 whereas it would not on ia32.
Also remove an unused constant from the FreeSpace class.
BUG=103103
Review URL: http://codereview.chromium.org/
8637015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10044
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
// Maximal allowed size, in bytes, of a single FixedArray.
// Prevents overflowing size computations, as well as extreme memory
// consumption.
- static const int kMaxSize = 512 * MB;
+ static const int kMaxSize = 128 * MB * kPointerSize;
// Maximally allowed length of a FixedArray.
static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize;
static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
- // Maximal size of a single FreeSpace.
- static const int kMaxSize = 512 * MB;
-
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(FreeSpace);
};