Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 94c8937d4592c6a1cc93377c18b609daa2e478dc..93e00d2d0b223b18d2b780b21e6c32ae58d3548b 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -939,6 +939,8 @@ bool Heap::ReserveSpace(Reservation* reservations) { |
for (auto& chunk : *reservation) { |
AllocationResult allocation; |
int size = chunk.size; |
+ DCHECK_LE(size, MemoryAllocator::PageAreaSize( |
+ static_cast<AllocationSpace>(space))); |
if (space == NEW_SPACE) { |
allocation = new_space()->AllocateRaw(size); |
} else { |