Index: src/heap/spaces-inl.h |
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h |
index 2079a80a0b00f0130aea154d0e873f7d5dbfcce1..73f138f2b2555ea2024a61e8b9e1586e6fb09e6e 100644 |
--- a/src/heap/spaces-inl.h |
+++ b/src/heap/spaces-inl.h |
@@ -15,6 +15,22 @@ |
namespace v8 { |
namespace internal { |
+template <MemoryAllocator::AllocationMode alloc_mode, typename SpaceType> |
+Page* MemoryAllocator::AllocatePage(size_t size, SpaceType* owner, |
+ Executability executable) { |
+ MemoryChunk* chunk = nullptr; |
+ if (alloc_mode == kPooled) { |
+ DCHECK_EQ(size, static_cast<size_t>(MemoryChunk::kAllocatableMemory)); |
+ DCHECK_EQ(executable, NOT_EXECUTABLE); |
+ chunk = AllocatePagePooled(owner); |
+ } |
+ if (chunk == nullptr) { |
+ chunk = AllocateChunk(size, size, executable, owner); |
+ } |
+ if (chunk == nullptr) return nullptr; |
+ return Page::Initialize(isolate_->heap(), chunk, executable, owner); |
+} |
+ |
template <class PAGE_TYPE> |
PageIteratorImpl<PAGE_TYPE>& PageIteratorImpl<PAGE_TYPE>::operator++() { |
p_ = p_->next_page(); |