Index: src/heap/spaces.cc |
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc |
index 85281aabbfe001b37eb540202684799492bc1c18..430f31de6c6d61db8973191a6a7d368ca0b111e8 100644 |
--- a/src/heap/spaces.cc |
+++ b/src/heap/spaces.cc |
@@ -892,18 +892,14 @@ void MemoryChunk::IncrementLiveBytesFromMutator(Address address, int by) { |
// ----------------------------------------------------------------------------- |
// PagedSpace implementation |
-PagedSpace::PagedSpace(Heap* heap, intptr_t max_capacity, AllocationSpace id, |
+PagedSpace::PagedSpace(Heap* heap, intptr_t max_capacity, AllocationSpace space, |
Executability executable) |
- : Space(heap, id, executable), |
+ : Space(heap, space, executable), |
free_list_(this), |
unswept_free_bytes_(0), |
end_of_unswept_pages_(NULL), |
emergency_memory_(NULL) { |
- if (id == CODE_SPACE) { |
- area_size_ = heap->isolate()->memory_allocator()->CodePageAreaSize(); |
- } else { |
- area_size_ = Page::kPageSize - Page::kObjectStartOffset; |
- } |
+ area_size_ = MemoryAllocator::PageAreaSize(space); |
max_capacity_ = |
(RoundDown(max_capacity, Page::kPageSize) / Page::kPageSize) * AreaSize(); |
accounting_stats_.Clear(); |