summaryrefslogtreecommitdiffstats
path: root/content/app
diff options
context:
space:
mode:
authoralexeif@chromium.org <alexeif@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-17 11:44:10 +0000
committeralexeif@chromium.org <alexeif@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-17 11:44:10 +0000
commit094c893329ffdd23a9350bfd94d40b99334be8f2 (patch)
treea662cab19b05e7041babedaa19012d0e26dcf69a /content/app
parentf657d5140d661aca265c0350772d9fa78a0c8316 (diff)
downloadchromium_src-094c893329ffdd23a9350bfd94d40b99334be8f2.zip
chromium_src-094c893329ffdd23a9350bfd94d40b99334be8f2.tar.gz
chromium_src-094c893329ffdd23a9350bfd94d40b99334be8f2.tar.bz2
Expose memory allocator internal stats and properties.
Review URL: https://chromiumcodereview.appspot.com/10825250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/app')
-rw-r--r--content/app/content_main_runner.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 1ec1e50..aabe6a3 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -472,6 +472,10 @@ class ContentMainRunnerImpl : public ContentMainRunner {
}
#if defined(USE_TCMALLOC)
+static bool GetPropertyThunk(const char* name, size_t* value) {
+ return MallocExtension::instance()->GetNumericProperty(name, value);
+}
+
static void GetStatsThunk(char* buffer, int buffer_length) {
MallocExtension::instance()->GetStats(buffer, buffer_length);
}
@@ -510,6 +514,7 @@ static void ReleaseFreeMemoryThunk() {
tc_set_new_mode(1);
// On windows, we've already set these thunks up in _heap_init()
+ base::allocator::SetGetPropertyFunction(GetPropertyThunk);
base::allocator::SetGetStatsFunction(GetStatsThunk);
base::allocator::SetReleaseFreeMemoryFunction(ReleaseFreeMemoryThunk);