Make the full object memory size of a page available for a single allocation.
BUG= R=mvstanton@chromium.org Review URL: https://codereview.chromium.org/145493004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
cf138c64b4
commit
a92e87e100
@ -2936,7 +2936,7 @@ MaybeObject* Heap::AllocateHeapNumber(double value, PretenureFlag pretenure) {
|
||||
// Statically ensure that it is safe to allocate heap numbers in paged
|
||||
// spaces.
|
||||
int size = HeapNumber::kSize;
|
||||
STATIC_ASSERT(HeapNumber::kSize <= Page::kNonCodeObjectAreaSize);
|
||||
STATIC_ASSERT(HeapNumber::kSize <= Page::kMaxNonCodeHeapObjectSize);
|
||||
AllocationSpace space = SelectSpace(size, OLD_DATA_SPACE, pretenure);
|
||||
|
||||
Object* result;
|
||||
@ -2952,7 +2952,7 @@ MaybeObject* Heap::AllocateHeapNumber(double value, PretenureFlag pretenure) {
|
||||
|
||||
MaybeObject* Heap::AllocateCell(Object* value) {
|
||||
int size = Cell::kSize;
|
||||
STATIC_ASSERT(Cell::kSize <= Page::kNonCodeObjectAreaSize);
|
||||
STATIC_ASSERT(Cell::kSize <= Page::kMaxNonCodeHeapObjectSize);
|
||||
|
||||
Object* result;
|
||||
{ MaybeObject* maybe_result = AllocateRaw(size, CELL_SPACE, CELL_SPACE);
|
||||
@ -2966,7 +2966,7 @@ MaybeObject* Heap::AllocateCell(Object* value) {
|
||||
|
||||
MaybeObject* Heap::AllocatePropertyCell() {
|
||||
int size = PropertyCell::kSize;
|
||||
STATIC_ASSERT(PropertyCell::kSize <= Page::kNonCodeObjectAreaSize);
|
||||
STATIC_ASSERT(PropertyCell::kSize <= Page::kMaxNonCodeHeapObjectSize);
|
||||
|
||||
Object* result;
|
||||
MaybeObject* maybe_result =
|
||||
@ -5348,7 +5348,7 @@ MaybeObject* Heap::AllocateHashTable(int length, PretenureFlag pretenure) {
|
||||
|
||||
MaybeObject* Heap::AllocateSymbol() {
|
||||
// Statically ensure that it is safe to allocate symbols in paged spaces.
|
||||
STATIC_ASSERT(Symbol::kSize <= Page::kNonCodeObjectAreaSize);
|
||||
STATIC_ASSERT(Symbol::kSize <= Page::kMaxNonCodeHeapObjectSize);
|
||||
|
||||
Object* result;
|
||||
MaybeObject* maybe =
|
||||
|
@ -165,7 +165,7 @@ Page* Page::Initialize(Heap* heap,
|
||||
Executability executable,
|
||||
PagedSpace* owner) {
|
||||
Page* page = reinterpret_cast<Page*>(chunk);
|
||||
ASSERT(page->area_size() <= kNonCodeObjectAreaSize);
|
||||
ASSERT(page->area_size() <= kMaxNonCodeHeapObjectSize);
|
||||
ASSERT(chunk->owner() == owner);
|
||||
owner->IncreaseCapacity(page->area_size());
|
||||
owner->Free(page->area_start(), page->area_size());
|
||||
|
10
src/spaces.h
10
src/spaces.h
@ -779,15 +779,11 @@ class Page : public MemoryChunk {
|
||||
// Page size in bytes. This must be a multiple of the OS page size.
|
||||
static const int kPageSize = 1 << kPageSizeBits;
|
||||
|
||||
// Object area size in bytes.
|
||||
static const int kNonCodeObjectAreaSize = kPageSize - kObjectStartOffset;
|
||||
|
||||
// Maximum object size that fits in a page. Objects larger than that size
|
||||
// are allocated in large object space and are never moved in memory. This
|
||||
// also applies to new space allocation, since objects are never migrated
|
||||
// from new space to large object space. Takes double alignment into account.
|
||||
static const int kMaxNonCodeHeapObjectSize =
|
||||
kNonCodeObjectAreaSize - kPointerSize;
|
||||
static const int kMaxNonCodeHeapObjectSize = kPageSize - kObjectStartOffset;
|
||||
|
||||
// Page size mask.
|
||||
static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1;
|
||||
@ -2013,7 +2009,7 @@ class NewSpacePage : public MemoryChunk {
|
||||
(1 << MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING) |
|
||||
(1 << MemoryChunk::SCAN_ON_SCAVENGE);
|
||||
|
||||
static const int kAreaSize = Page::kNonCodeObjectAreaSize;
|
||||
static const int kAreaSize = Page::kMaxNonCodeHeapObjectSize;
|
||||
|
||||
inline NewSpacePage* next_page() const {
|
||||
return static_cast<NewSpacePage*>(next_chunk());
|
||||
@ -2673,7 +2669,7 @@ class MapSpace : public PagedSpace {
|
||||
virtual void VerifyObject(HeapObject* obj);
|
||||
|
||||
private:
|
||||
static const int kMapsPerPage = Page::kNonCodeObjectAreaSize / Map::kSize;
|
||||
static const int kMapsPerPage = Page::kMaxNonCodeHeapObjectSize / Map::kSize;
|
||||
|
||||
// Do map space compaction if there is a page gap.
|
||||
int CompactionThreshold() {
|
||||
|
@ -35,9 +35,6 @@
|
||||
# BUG(v8:2921).
|
||||
'debug-step-4-in-frame': [PASS, FAIL, SLOW],
|
||||
|
||||
# TODO(hpayer): Investigate.
|
||||
'json2': [PASS, FLAKY],
|
||||
|
||||
##############################################################################
|
||||
# Fails.
|
||||
'regress/regress-1119': [FAIL],
|
||||
|
Loading…
Reference in New Issue
Block a user