summaryrefslogtreecommitdiff
path: root/src/gperftools/malloc_extension.h
diff options
context:
space:
mode:
authorGabriel Marin <gmx@chromium.org>2018-10-03 18:15:16 +0000
committerAliaksey Kandratsenka <alkondratenko@gmail.com>2018-10-06 11:07:59 -0700
commitb85652bf268d061a0ad0aec90f0d3c29aa80a6b5 (patch)
tree4d2a1acdf45ca03b3f5ddbfebc82fed2413e9268 /src/gperftools/malloc_extension.h
parent90df23c81fe6baf7799b5d3df37d2846ab88fc60 (diff)
downloadgperftools-b85652bf268d061a0ad0aec90f0d3c29aa80a6b5.tar.gz
Add generic.total_physical_bytes property to MallocExtension
Original CL: - https://codereview.chromium.org/1410353005 Add generic.total_physical_bytes property to MallocExtension The actual physical memory usage of tcmalloc cannot be obtained by GetNumericProperty. This accounts for the current_allocated_bytes, fragmentation and malloc metadata, and excludes the unmapped memory regions. This helps the user to understand how much memory is actually being used for the allocations that were made. Reviewed-on: https://chromium-review.googlesource.com/1130803
Diffstat (limited to 'src/gperftools/malloc_extension.h')
-rw-r--r--src/gperftools/malloc_extension.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gperftools/malloc_extension.h b/src/gperftools/malloc_extension.h
index 1800266..1be138a 100644
--- a/src/gperftools/malloc_extension.h
+++ b/src/gperftools/malloc_extension.h
@@ -168,6 +168,14 @@ class PERFTOOLS_DLL_DECL MallocExtension {
// freed memory regions
// This property is not writable.
//
+ // "generic.total_physical_bytes"
+ // Estimate of total bytes of the physical memory usage by the
+ // allocator ==
+ // current_allocated_bytes +
+ // fragmentation +
+ // metadata
+ // This property is not writable.
+ //
// tcmalloc
// --------
// "tcmalloc.max_total_thread_cache_bytes"