Index: third_party/tcmalloc/vendor/src/memory_region_map.h |
diff --git a/third_party/tcmalloc/vendor/src/memory_region_map.h b/third_party/tcmalloc/vendor/src/memory_region_map.h |
index 739514c22c61d0299402c4d69c62cffd6cc98985..988ea707375aed124136fe0bb7db105dbb2952a7 100644 |
--- a/third_party/tcmalloc/vendor/src/memory_region_map.h |
+++ b/third_party/tcmalloc/vendor/src/memory_region_map.h |
@@ -252,6 +252,10 @@ class MemoryRegionMap { |
static RegionIterator BeginRegionLocked(); |
static RegionIterator EndRegionLocked(); |
+ // Return the accumulated sizes of mapped and unmapped regions. |
+ static int64 MapSize() { return map_size_; } |
+ static int64 UnmapSize() { return unmap_size_; } |
+ |
// Effectively private type from our .cc ================================= |
// public to let us declare global objects: |
union RegionSetRep; |
@@ -286,6 +290,11 @@ class MemoryRegionMap { |
// The thread id of the thread that's inside the recursive lock. |
static pthread_t lock_owner_tid_; |
+ // Total size of all mapped pages so far |
+ static int64 map_size_; |
+ // Total size of all unmapped pages so far |
+ static int64 unmap_size_; |
+ |
// helpers ================================================================== |
// Helper for FindRegion and FindAndMarkStackRegion: |