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

Unified Diff: src/heap/spaces.cc

Issue 2364923002: [heap] New heuristics for starting of incremental marking. (Closed)
Patch Set: rebase Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/incremental-marking-job.cc ('k') | test/cctest/heap/heap-tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index a274fddf45d5b8fd2d31578ccc07bb416752e9e2..dd52bcac5953413ce00932b70a1761e930ee892a 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -2889,19 +2889,7 @@ HeapObject* PagedSpace::SlowAllocateRaw(int size_in_bytes) {
}
}
- // Free list allocation failed and there is no next page. Fail if we have
- // hit the old generation size limit that should cause a garbage
- // collection.
- if (!heap()->always_allocate() &&
- heap()->OldGenerationAllocationLimitReached()) {
- // If sweeper threads are active, wait for them at that point and steal
- // elements form their free-lists.
- HeapObject* object = SweepAndRetryAllocation(size_in_bytes);
- return object;
- }
-
- // Try to expand the space and allocate in the new next page.
- if (Expand()) {
+ if (heap()->ShouldExpandOldGenerationOnAllocationFailure() && Expand()) {
DCHECK((CountTotalPages() > 1) ||
(size_in_bytes <= free_list_.Available()));
return free_list_.Allocate(size_in_bytes);
« no previous file with comments | « src/heap/incremental-marking-job.cc ('k') | test/cctest/heap/heap-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698