Bump MaxRegularSpaceAllocationSize to InitialSemiSpaceSize() * 4/5

to allow allocation of large packed arrays in paged spaces.

BUG=v8:2790
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/23604023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2013-09-02 13:36:49 +00:00
parent 521afe16d2
commit 6e4bec8f88
3 changed files with 10 additions and 5 deletions

View File

@ -6716,6 +6716,12 @@ bool Heap::ConfigureHeap(int max_semispace_size,
RoundUp(max_old_generation_size_,
Page::kPageSize));
// We rely on being able to allocate new arrays in paged spaces.
ASSERT(MaxRegularSpaceAllocationSize() >=
(JSArray::kSize +
FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) +
AllocationMemento::kSize));
configured_ = true;
return true;
}

View File

@ -523,7 +523,7 @@ class Heap {
int InitialSemiSpaceSize() { return initial_semispace_size_; }
intptr_t MaxOldGenerationSize() { return max_old_generation_size_; }
intptr_t MaxExecutableSize() { return max_executable_size_; }
int MaxRegularSpaceAllocationSize() { return InitialSemiSpaceSize() * 3/4; }
int MaxRegularSpaceAllocationSize() { return InitialSemiSpaceSize() * 4/5; }
// Returns the capacity of the heap in bytes w/o growing. Heap grows when
// more spaces are needed until it reaches the limit.

View File

@ -2680,10 +2680,9 @@ class JSObject: public JSReceiver {
// don't want to be wasteful with long lived objects.
static const int kMaxUncheckedOldFastElementsLength = 500;
// TODO(2790): HAllocate currently always allocates fast backing stores
// in new space, where on x64 we can only fit ~98K elements. Keep this
// limit lower than that until HAllocate is made smarter.
static const int kInitialMaxFastElementArray = 95000;
// Note that Heap::MaxRegularSpaceAllocationSize() puts a limit on
// permissible values (see the ASSERT in heap.cc).
static const int kInitialMaxFastElementArray = 100000;
static const int kFastPropertiesSoftLimit = 12;
static const int kMaxFastProperties = 64;