| Index: test/cctest/heap/utils-inl.h
|
| diff --git a/test/cctest/heap/utils-inl.h b/test/cctest/heap/utils-inl.h
|
| index 0e943b4197538bccb7bd79c14c0bcd352a512177..9c59951f5a6b8d8fbc3c0f2baf91f88701d0de10 100644
|
| --- a/test/cctest/heap/utils-inl.h
|
| +++ b/test/cctest/heap/utils-inl.h
|
| @@ -35,8 +35,7 @@ static inline std::vector<Handle<FixedArray>> CreatePadding(
|
| } else {
|
| heap->new_space()->DisableInlineAllocationSteps();
|
| int overall_free_memory =
|
| - static_cast<int>(*heap->new_space()->allocation_limit_address() -
|
| - *heap->new_space()->allocation_top_address());
|
| + static_cast<int>(heap->new_space()->limit() - heap->new_space()->top());
|
| CHECK(padding_size <= overall_free_memory || overall_free_memory == 0);
|
| }
|
| while (free_memory > 0) {
|
| @@ -48,8 +47,13 @@ static inline std::vector<Handle<FixedArray>> CreatePadding(
|
| length = LenFromSize(allocate_memory);
|
| if (length <= 0) {
|
| // Not enough room to create another fixed array. Let's create a filler.
|
| - heap->CreateFillerObjectAt(*heap->old_space()->allocation_top_address(),
|
| - free_memory, ClearRecordedSlots::kNo);
|
| + if (tenure == i::TENURED) {
|
| + heap->CreateFillerObjectAt(heap->old_space()->top(), free_memory,
|
| + ClearRecordedSlots::kNo);
|
| + } else {
|
| + heap->CreateFillerObjectAt(heap->new_space()->top(), free_memory,
|
| + ClearRecordedSlots::kNo);
|
| + }
|
| break;
|
| }
|
| }
|
| @@ -67,8 +71,7 @@ static inline bool FillUpOnePage(
|
| v8::internal::NewSpace* space,
|
| std::vector<Handle<FixedArray>>* out_handles = nullptr) {
|
| space->DisableInlineAllocationSteps();
|
| - int space_remaining = static_cast<int>(*space->allocation_limit_address() -
|
| - *space->allocation_top_address());
|
| + int space_remaining = static_cast<int>(space->limit() - space->top());
|
| if (space_remaining == 0) return false;
|
| std::vector<Handle<FixedArray>> handles =
|
| CreatePadding(space->heap(), space_remaining, i::NOT_TENURED);
|
| @@ -83,8 +86,7 @@ static inline void AllocateAllButNBytes(
|
| v8::internal::NewSpace* space, int extra_bytes,
|
| std::vector<Handle<FixedArray>>* out_handles = nullptr) {
|
| space->DisableInlineAllocationSteps();
|
| - int space_remaining = static_cast<int>(*space->allocation_limit_address() -
|
| - *space->allocation_top_address());
|
| + int space_remaining = static_cast<int>(space->limit() - space->top());
|
| CHECK(space_remaining >= extra_bytes);
|
| int new_linear_size = space_remaining - extra_bytes;
|
| if (new_linear_size == 0) return;
|
|
|