Index: src/heap/spaces.cc |
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc |
index 37a123d91dfeddfbf6e31e54ccc793d032e72354..3802e470bd454a7da2680589f71bd31cb86ff37a 100644 |
--- a/src/heap/spaces.cc |
+++ b/src/heap/spaces.cc |
@@ -140,7 +140,8 @@ bool CodeRange::SetUp(size_t requested) { |
base += kReservedCodeRangePages * base::OS::CommitPageSize(); |
} |
Address aligned_base = RoundUp(base, MemoryChunk::kAlignment); |
- size_t size = code_range_->size() - (aligned_base - base); |
+ size_t size = code_range_->size() - (aligned_base - base) - |
+ kReservedCodeRangePages * base::OS::CommitPageSize(); |
allocation_list_.Add(FreeBlock(aligned_base, size)); |
current_allocation_block_index_ = 0; |