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

Unified Diff: src/heap/spaces.cc

Issue 2379663002: Reland "[heap] New heuristics for starting of incremental marking. (patchset #9 id:160001 of https:… (Closed)
Patch Set: fix 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 071816f35f5ef197fa6c0f96805072d38ffbe391..525e78461edf19e05f16d50e2b8ff6f25879df4d 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