Commit 9ec92be9 authored by Hannes Payer's avatar Hannes Payer Committed by Commit Bot

[heap] Fix cctest expectations for large object allocations.

Bug: chromium:852420
Change-Id: Ie1f656cafe78c517ff53676d8cb7200d0bf1d7cc
Reviewed-on: https://chromium-review.googlesource.com/c/1356518Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57972}
parent 10ea3f8a
......@@ -5307,7 +5307,7 @@ TEST(Regress598319) {
// Temporary scope to avoid getting any other objects into the root set.
v8::HandleScope scope(CcTest::isolate());
Handle<FixedArray> tmp =
isolate->factory()->NewFixedArray(number_of_objects);
isolate->factory()->NewFixedArray(number_of_objects, TENURED);
root->set(0, *tmp);
for (int i = 0; i < get()->length(); i++) {
tmp = isolate->factory()->NewFixedArray(100, TENURED);
......@@ -5818,7 +5818,7 @@ TEST(UncommitUnusedLargeObjectMemory) {
Heap* heap = CcTest::heap();
Isolate* isolate = heap->isolate();
Handle<FixedArray> array = isolate->factory()->NewFixedArray(200000);
Handle<FixedArray> array = isolate->factory()->NewFixedArray(200000, TENURED);
MemoryChunk* chunk = MemoryChunk::FromAddress(array->address());
CHECK(chunk->owner()->identity() == LO_SPACE);
......@@ -5841,8 +5841,8 @@ TEST(RememberedSetRemoveRange) {
Heap* heap = CcTest::heap();
Isolate* isolate = heap->isolate();
Handle<FixedArray> array = isolate->factory()->NewFixedArray(Page::kPageSize /
kPointerSize);
Handle<FixedArray> array = isolate->factory()->NewFixedArray(
Page::kPageSize / kPointerSize, TENURED);
MemoryChunk* chunk = MemoryChunk::FromAddress(array->address());
CHECK(chunk->owner()->identity() == LO_SPACE);
Address start = array->address();
......@@ -5933,7 +5933,8 @@ HEAP_TEST(Regress670675) {
for (size_t i = 0; i < n + 40; i++) {
{
HandleScope inner_scope(isolate);
isolate->factory()->NewFixedArray(static_cast<int>(array_length));
isolate->factory()->NewFixedArray(static_cast<int>(array_length),
TENURED);
}
if (marking->IsStopped()) break;
double deadline = heap->MonotonicallyIncreasingTimeInMs() + 1;
......
......@@ -246,8 +246,8 @@ HEAP_TEST(InvalidatedSlotsRightTrimLargeFixedArray) {
Handle<FixedArray> trimmed;
{
AlwaysAllocateScope always_allocate(isolate);
trimmed =
factory->NewFixedArray(kMaxRegularHeapObjectSize / kPointerSize + 100);
trimmed = factory->NewFixedArray(
kMaxRegularHeapObjectSize / kPointerSize + 100, TENURED);
DCHECK(MemoryChunk::FromHeapObject(*trimmed)->InLargeObjectSpace());
}
heap::SimulateIncrementalMarking(heap);
......
......@@ -18989,7 +18989,7 @@ TEST(GetHeapSpaceStatistics) {
// Force allocation in LO_SPACE so that every space has non-zero size.
v8::internal::Isolate* i_isolate =
reinterpret_cast<v8::internal::Isolate*>(isolate);
auto unused = i_isolate->factory()->TryNewFixedArray(512 * 1024);
auto unused = i_isolate->factory()->TryNewFixedArray(512 * 1024, i::TENURED);
USE(unused);
isolate->GetHeapStatistics(&heap_statistics);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment