Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: test/cctest/heap/test-heap.cc

Issue 2565173004: [heap] Special handling for small heaps in eager finalization of (Closed)
Patch Set: fix test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 7048 matching lines...) Expand 10 before | Expand all | Expand 10 after
7059 7059
7060 if (collector->sweeping_in_progress()) { 7060 if (collector->sweeping_in_progress()) {
7061 collector->EnsureSweepingCompleted(); 7061 collector->EnsureSweepingCompleted();
7062 } 7062 }
7063 i::IncrementalMarking* marking = CcTest::heap()->incremental_marking(); 7063 i::IncrementalMarking* marking = CcTest::heap()->incremental_marking();
7064 if (marking->IsStopped()) { 7064 if (marking->IsStopped()) {
7065 marking->Start(i::GarbageCollectionReason::kTesting); 7065 marking->Start(i::GarbageCollectionReason::kTesting);
7066 } 7066 }
7067 size_t array_length = Page::kPageSize / kPointerSize + 100; 7067 size_t array_length = Page::kPageSize / kPointerSize + 100;
7068 size_t n = heap->OldGenerationSpaceAvailable() / array_length; 7068 size_t n = heap->OldGenerationSpaceAvailable() / array_length;
7069 for (size_t i = 0; i < n + 10; i++) { 7069 for (size_t i = 0; i < n + 40; i++) {
7070 { 7070 {
7071 HandleScope inner_scope(isolate); 7071 HandleScope inner_scope(isolate);
7072 isolate->factory()->NewFixedArray(static_cast<int>(array_length)); 7072 isolate->factory()->NewFixedArray(static_cast<int>(array_length));
7073 } 7073 }
7074 if (marking->IsStopped()) break; 7074 if (marking->IsStopped()) break;
7075 double deadline = heap->MonotonicallyIncreasingTimeInMs() + 1; 7075 double deadline = heap->MonotonicallyIncreasingTimeInMs() + 1;
7076 marking->AdvanceIncrementalMarking( 7076 marking->AdvanceIncrementalMarking(
7077 deadline, IncrementalMarking::GC_VIA_STACK_GUARD, 7077 deadline, IncrementalMarking::GC_VIA_STACK_GUARD,
7078 IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8); 7078 IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
7079 } 7079 }
7080 DCHECK(marking->IsStopped()); 7080 DCHECK(marking->IsStopped());
7081 } 7081 }
7082 7082
7083 } // namespace internal 7083 } // namespace internal
7084 } // namespace v8 7084 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698