Index: src/heap/heap.h |
diff --git a/src/heap/heap.h b/src/heap/heap.h |
index 82642266af2a04577c2ee3905a8e682db66d2d3c..150647fbc7c0d2ad31dcc8a36ceaa8e01e54b833 100644 |
--- a/src/heap/heap.h |
+++ b/src/heap/heap.h |
@@ -818,6 +818,16 @@ class Heap { |
amount_of_external_allocated_memory_ += delta; |
} |
+ void update_amount_of_external_allocated_freed_memory(intptr_t freed) { |
+ amount_of_external_allocated_memory_freed_.Increment(freed); |
+ } |
+ |
+ void account_amount_of_external_allocated_freed_memory() { |
+ amount_of_external_allocated_memory_ -= |
+ amount_of_external_allocated_memory_freed_.Value(); |
+ amount_of_external_allocated_memory_freed_.SetValue(0); |
+ } |
+ |
void DeoptMarkedAllocationSites(); |
bool DeoptMaybeTenuredAllocationSites() { |
@@ -1985,6 +1995,8 @@ class Heap { |
// Caches the amount of external memory registered at the last global gc. |
int64_t amount_of_external_allocated_memory_at_last_global_gc_; |
+ base::AtomicNumber<intptr_t> amount_of_external_allocated_memory_freed_; |
+ |
// This can be calculated directly from a pointer to the heap; however, it is |
// more expedient to get at the isolate directly from within Heap methods. |
Isolate* isolate_; |