Index: third_party/tcmalloc/chromium/src/tcmalloc.cc |
diff --git a/third_party/tcmalloc/chromium/src/tcmalloc.cc b/third_party/tcmalloc/chromium/src/tcmalloc.cc |
index c8a705ff501f26bf5cd58eabcdeed049444b755b..4709411718bc9eba3e96af3d4b4cc6ac1233284b 100644 |
--- a/third_party/tcmalloc/chromium/src/tcmalloc.cc |
+++ b/third_party/tcmalloc/chromium/src/tcmalloc.cc |
@@ -678,6 +678,14 @@ class TCMallocImplementation : public MallocExtension { |
return true; |
} |
+ if (strcmp(name, "generic.total_physical_bytes") == 0) { |
+ TCMallocStats stats; |
+ ExtractStats(&stats, NULL, NULL, NULL); |
+ *value = stats.pageheap.system_bytes + stats.metadata_bytes - |
+ stats.pageheap.unmapped_bytes - stats.metadata_unmapped_bytes; |
+ return true; |
+ } |
+ |
if (strcmp(name, "tcmalloc.slack_bytes") == 0) { |
// Kept for backwards compatibility. Now defined externally as: |
// pageheap_free_bytes + pageheap_unmapped_bytes. |