summaryrefslogtreecommitdiffstats
path: root/chromium/v8/src/heap/local-heap.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/v8/src/heap/local-heap.h')
-rw-r--r--chromium/v8/src/heap/local-heap.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/chromium/v8/src/heap/local-heap.h b/chromium/v8/src/heap/local-heap.h
index 31c66bc2be5..8406c39042d 100644
--- a/chromium/v8/src/heap/local-heap.h
+++ b/chromium/v8/src/heap/local-heap.h
@@ -48,6 +48,17 @@ class LocalHeap {
ConcurrentAllocator* old_space_allocator() { return &old_space_allocator_; }
+ // Mark/Unmark linear allocation areas black. Used for black allocation.
+ void MarkLinearAllocationAreaBlack();
+ void UnmarkLinearAllocationArea();
+
+ // Give up linear allocation areas. Used for mark-compact GC.
+ void FreeLinearAllocationArea();
+
+ // Create filler object in linear allocation areas. Verifying requires
+ // iterable heap.
+ void MakeLinearAllocationAreaIterable();
+
private:
enum class ThreadState {
// Threads in this state need to be stopped in a safepoint.
@@ -68,9 +79,6 @@ class LocalHeap {
void EnterSafepoint();
- void FreeLinearAllocationArea();
- void MakeLinearAllocationAreaIterable();
-
Heap* heap_;
base::Mutex state_mutex_;
@@ -107,6 +115,19 @@ class ParkedScope {
LocalHeap* local_heap_;
};
+class ParkedMutexGuard {
+ base::Mutex* guard_;
+
+ public:
+ explicit ParkedMutexGuard(LocalHeap* local_heap, base::Mutex* guard)
+ : guard_(guard) {
+ ParkedScope scope(local_heap);
+ guard_->Lock();
+ }
+
+ ~ParkedMutexGuard() { guard_->Unlock(); }
+};
+
} // namespace internal
} // namespace v8