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

Unified Diff: src/heap/spaces.h

Issue 1222013002: Concurrent sweeping of code space. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/mark-compact.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 3461de3ef009f18d9549a8de8f18ce831ba2f572..d870b7bb1ffcdc6aaeaa2c71151683157588267e 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -1014,6 +1014,10 @@ class SkipList {
list->AddObject(addr, size);
}
+ void Lock() { mutex_.Lock(); }
+
+ void Unlock() { mutex_.Unlock(); }
+
private:
static const int kRegionSizeLog2 = 13;
static const int kRegionSize = 1 << kRegionSizeLog2;
@@ -1022,6 +1026,7 @@ class SkipList {
STATIC_ASSERT(Page::kPageSize % kRegionSize == 0);
Address starts_[kSize];
+ base::Mutex mutex_;
};
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698