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

Unified Diff: src/heap/heap.h

Issue 1964023002: [heap] Fine-grained JSArrayBuffer tracking (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tests once more Created 4 years, 7 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
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index fd788cdbe991c413d00e7ee2ce74ca9b4a7a2371..2da975b954c7b71d27973bb6e6ad68fe168bf74f 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -805,11 +805,11 @@ class Heap {
}
int64_t amount_of_external_allocated_memory() {
- return amount_of_external_allocated_memory_;
+ return amount_of_external_allocated_memory_.Value();
}
void update_amount_of_external_allocated_memory(int64_t delta) {
- amount_of_external_allocated_memory_ += delta;
+ amount_of_external_allocated_memory_.Increment(delta);
}
void DeoptMarkedAllocationSites();
@@ -1974,10 +1974,10 @@ class Heap {
// The amount of external memory registered through the API kept alive
// by global handles
- int64_t amount_of_external_allocated_memory_;
+ base::AtomicNumber<intptr_t> amount_of_external_allocated_memory_;
// Caches the amount of external memory registered at the last global gc.
- int64_t amount_of_external_allocated_memory_at_last_global_gc_;
+ intptr_t amount_of_external_allocated_memory_at_last_global_gc_;
// 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.

Powered by Google App Engine
This is Rietveld 408576698