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

Unified Diff: src/api.cc

Issue 2050173002: [DoNotSubmit] Added peak_memory_size to accounting-allocator. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « include/v8-version.h ('k') | src/base/accounting-allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 348724d9f04eaee3f27365a3e851ec42ef89a4b6..5a5254aaab0fe8ee576a0b7d945efe7fa3fbb15f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5498,6 +5498,7 @@ HeapStatistics::HeapStatistics()
used_heap_size_(0),
heap_size_limit_(0),
malloced_memory_(0),
+ malloced_peak_memory_(0),
does_zap_garbage_(0) {}
HeapSpaceStatistics::HeapSpaceStatistics(): space_name_(0),
@@ -7391,6 +7392,8 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
heap_statistics->heap_size_limit_ = heap->MaxReserved();
heap_statistics->malloced_memory_ =
isolate->allocator()->GetCurrentMemoryUsage();
+ heap_statistics->malloced_peak_memory_ =
+ isolate->allocator()->GetPeakMemoryUsage();
heap_statistics->does_zap_garbage_ = heap->ShouldZapGarbage();
}
« no previous file with comments | « include/v8-version.h ('k') | src/base/accounting-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698