diff options
author | ruuda <ruuda@google.com> | 2015-11-24 02:19:37 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-24 10:20:19 +0000 |
commit | 8e7faebfbdee8e62471a7ee839279f184b68980a (patch) | |
tree | eef265903cb3b989ea9cc91f07ab73f5d2bb4081 /content/app | |
parent | 04b8bd2ea68f22f8051d9988e4872e51c4ab4409 (diff) | |
download | chromium_src-8e7faebfbdee8e62471a7ee839279f184b68980a.zip chromium_src-8e7faebfbdee8e62471a7ee839279f184b68980a.tar.gz chromium_src-8e7faebfbdee8e62471a7ee839279f184b68980a.tar.bz2 |
Remove unused memory functions
In |blink::Platform|, the functions |processMemorySizesInBytes| and
|memoryAllocatorWasteInBytes| are unused. Let's remove them.
The function |base::allocator::GetAllocatorWasteSize| is not used
anywhere except in the unused Blink functions, so it can be removed as
well.
Detailed information about memory allocators is available in the memory-
infra category of chrome://tracing. It supports all allocators, not just
tcmalloc. |GetAllocatorWasteSize| was implemented for tcmalloc only.
Review URL: https://codereview.chromium.org/1468033002
Cr-Commit-Position: refs/heads/master@{#361303}
Diffstat (limited to 'content/app')
-rw-r--r-- | content/app/content_main_runner.cc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index b352c3e..7cf85f1 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -414,21 +414,6 @@ class ContentMainRunnerImpl : public ContentMainRunner { } #if defined(USE_TCMALLOC) - static bool GetAllocatorWasteSizeThunk(size_t* size) { - size_t heap_size, allocated_bytes, unmapped_bytes; - MallocExtension* ext = MallocExtension::instance(); - if (ext->GetNumericProperty("generic.heap_size", &heap_size) && - ext->GetNumericProperty("generic.current_allocated_bytes", - &allocated_bytes) && - ext->GetNumericProperty("tcmalloc.pageheap_unmapped_bytes", - &unmapped_bytes)) { - *size = heap_size - allocated_bytes - unmapped_bytes; - return true; - } - DCHECK(false); - return false; - } - static void GetStatsThunk(char* buffer, int buffer_length) { MallocExtension::instance()->GetStats(buffer, buffer_length); } @@ -471,8 +456,6 @@ class ContentMainRunnerImpl : public ContentMainRunner { tc_set_new_mode(1); // On windows, we've already set these thunks up in _heap_init() - base::allocator::SetGetAllocatorWasteSizeFunction( - GetAllocatorWasteSizeThunk); base::allocator::SetGetStatsFunction(GetStatsThunk); base::allocator::SetGetNumericPropertyFunction(GetNumericPropertyThunk); base::allocator::SetReleaseFreeMemoryFunction(ReleaseFreeMemoryThunk); |