Skip to content

Commit a373e75

Browse files
ulanCommit bot
authored andcommitted
Guard UnmapFreeMemoryTask with a flag.
BUG=chromium:574349 LOG=NO Review URL: https://codereview.chromium.org/1553233003 Cr-Commit-Position: refs/heads/master@{#33113}
1 parent f0e4117 commit a373e75

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/heap/heap.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6098,9 +6098,14 @@ void Heap::FilterStoreBufferEntriesOnAboutToBeFreedPages() {
60986098

60996099
void Heap::FreeQueuedChunks() {
61006100
if (chunks_queued_for_free_ != NULL) {
6101-
V8::GetCurrentPlatform()->CallOnBackgroundThread(
6102-
new UnmapFreeMemoryTask(this, chunks_queued_for_free_),
6103-
v8::Platform::kShortRunningTask);
6101+
if (FLAG_concurrent_sweeping) {
6102+
V8::GetCurrentPlatform()->CallOnBackgroundThread(
6103+
new UnmapFreeMemoryTask(this, chunks_queued_for_free_),
6104+
v8::Platform::kShortRunningTask);
6105+
} else {
6106+
FreeQueuedChunks(chunks_queued_for_free_);
6107+
pending_unmapping_tasks_semaphore_.Signal();
6108+
}
61046109
chunks_queued_for_free_ = NULL;
61056110
} else {
61066111
// If we do not have anything to unmap, we just signal the semaphore

0 commit comments

Comments
 (0)