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

Unified Diff: src/heap/heap.cc

Issue 1553233003: Guard UnmapFreeMemoryTask with a flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 0bd763bc763b7d22826cbd0646ac4dd69860640b..40c8e7914befb61c129f659dd5f3b62924a88e8d 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -6098,9 +6098,14 @@ void Heap::FilterStoreBufferEntriesOnAboutToBeFreedPages() {
void Heap::FreeQueuedChunks() {
if (chunks_queued_for_free_ != NULL) {
- V8::GetCurrentPlatform()->CallOnBackgroundThread(
- new UnmapFreeMemoryTask(this, chunks_queued_for_free_),
- v8::Platform::kShortRunningTask);
+ if (FLAG_concurrent_sweeping) {
+ V8::GetCurrentPlatform()->CallOnBackgroundThread(
+ new UnmapFreeMemoryTask(this, chunks_queued_for_free_),
+ v8::Platform::kShortRunningTask);
+ } else {
+ FreeQueuedChunks(chunks_queued_for_free_);
+ pending_unmapping_tasks_semaphore_.Signal();
+ }
chunks_queued_for_free_ = NULL;
} else {
// If we do not have anything to unmap, we just signal the semaphore
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698