| Index: src/heap/spaces-inl.h
|
| diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
|
| index f9f6f08bd54aa320c27e688791bbbf84d36c843b..2606b909ce4be37c4c0e69d060cdf8c3b346d217 100644
|
| --- a/src/heap/spaces-inl.h
|
| +++ b/src/heap/spaces-inl.h
|
| @@ -380,6 +380,12 @@ bool FreeListCategory::is_linked() {
|
| // the paged spaces.
|
| HeapObject* PagedSpace::AllocateLinearly(int size_in_bytes) {
|
| Address current_top = allocation_info_.top();
|
| + if (allocation_info_.top() > allocation_info_.limit()) {
|
| + PrintF("top > limit: %p %p\n",
|
| + reinterpret_cast<void*>(allocation_info_.top()),
|
| + reinterpret_cast<void*>(allocation_info_.limit())),
|
| + PrintStackFramesAndDie();
|
| + }
|
| Address new_top = current_top + size_in_bytes;
|
| if (new_top > allocation_info_.limit()) return NULL;
|
|
|
| @@ -477,14 +483,20 @@ AllocationResult PagedSpace::AllocateRawAligned(int size_in_bytes,
|
| object = free_list_.Allocate(allocation_size);
|
| if (object == NULL) {
|
| object = SlowAllocateRaw(allocation_size);
|
| + } else {
|
| + DCHECK(allocation_info_.limit() != nullptr);
|
| }
|
| if (object != NULL && filler_size != 0) {
|
| + DCHECK(allocation_info_.limit() != nullptr);
|
| object = heap()->AlignWithFiller(object, size_in_bytes, allocation_size,
|
| alignment);
|
| + DCHECK(allocation_info_.limit() != nullptr);
|
| // Filler objects are initialized, so mark only the aligned object memory
|
| // as uninitialized.
|
| allocation_size = size_in_bytes;
|
| }
|
| + } else {
|
| + DCHECK(allocation_info_.limit() != nullptr);
|
| }
|
|
|
| if (object != NULL) {
|
| @@ -508,7 +520,9 @@ AllocationResult PagedSpace::AllocateRaw(int size_in_bytes,
|
| #endif
|
| HeapObject* heap_obj = nullptr;
|
| if (!result.IsRetry() && result.To(&heap_obj)) {
|
| + DCHECK(allocation_info_.limit() != nullptr);
|
| AllocationStep(heap_obj->address(), size_in_bytes);
|
| + DCHECK(allocation_info_.limit() != nullptr);
|
| }
|
| return result;
|
| }
|
|
|