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

Unified Diff: src/heap/spaces.cc

Issue 2244233007: Revert of [heap] Don't unmap new space pages while sweeping is active (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/spaces.h ('k') | no next file » | 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 97b85d42986f1df224e6396447da06f2dd9d5dda..1b7a189539caea07b66e15e7d11b9e7908fbfbfd 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -3,8 +3,6 @@
// found in the LICENSE file.
#include "src/heap/spaces.h"
-
-#include <utility>
#include "src/base/bits.h"
#include "src/base/platform/platform.h"
@@ -350,7 +348,6 @@
};
void MemoryAllocator::Unmapper::FreeQueuedChunks() {
- ReconsiderDelayedChunks();
if (FLAG_concurrent_sweeping) {
V8::GetCurrentPlatform()->CallOnBackgroundThread(
new UnmapFreeMemoryTask(this), v8::Platform::kShortRunningTask);
@@ -382,24 +379,6 @@
while ((chunk = GetMemoryChunkSafe<kNonRegular>()) != nullptr) {
allocator_->PerformFreeMemory(chunk);
}
-}
-
-void MemoryAllocator::Unmapper::ReconsiderDelayedChunks() {
- std::list<MemoryChunk*> delayed_chunks(std::move(delayed_regular_chunks_));
- // Move constructed, so the permanent list should be empty.
- DCHECK(delayed_regular_chunks_.empty());
- for (auto it = delayed_chunks.begin(); it != delayed_chunks.end(); ++it) {
- AddMemoryChunkSafe<kRegular>(*it);
- }
-}
-
-bool MemoryAllocator::CanFreeMemoryChunk(MemoryChunk* chunk) {
- MarkCompactCollector* mc = isolate_->heap()->mark_compact_collector();
- // We cannot free memory chunks in new space while the sweeper is running
- // since a sweeper thread might be stuck right before trying to lock the
- // corresponding page.
- return !chunk->InNewSpace() || (mc == nullptr) ||
- mc->sweeper().IsSweepingCompleted();
}
bool MemoryAllocator::CommitMemory(Address base, size_t size,
« no previous file with comments | « src/heap/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698