Commit 1cf00a15 authored by Jason Roberts's avatar Jason Roberts Committed by Commit Bot

[tcmalloc] Provide low memory footprint build option for tcmalloc.

Bug: 856704
Change-Id: I48b28d389aa602718c5dae2afed98dc19322dd24
Reviewed-on: https://chromium-review.googlesource.com/1115356Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Jason Roberts <jasonroberts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570802}
parent b63f00de
...@@ -11,6 +11,9 @@ declare_args() { ...@@ -11,6 +11,9 @@ declare_args() {
# e.g. for profiling (it's more rare to profile Debug builds, # e.g. for profiling (it's more rare to profile Debug builds,
# but people sometimes need to do that). # but people sometimes need to do that).
enable_debugallocation = is_debug enable_debugallocation = is_debug
# Provide a way to build tcmalloc with a low memory footprint.
use_tcmalloc_small_but_slow = false
} }
# This "allocator" meta-target will forward to the default allocator according # This "allocator" meta-target will forward to the default allocator according
...@@ -36,6 +39,9 @@ config("tcmalloc_flags") { ...@@ -36,6 +39,9 @@ config("tcmalloc_flags") {
if (use_allocator_shim) { if (use_allocator_shim) {
defines += [ "TCMALLOC_DONT_REPLACE_SYSTEM_ALLOC" ] defines += [ "TCMALLOC_DONT_REPLACE_SYSTEM_ALLOC" ]
} }
if (use_tcmalloc_small_but_slow) {
defines += [ "TCMALLOC_SMALL_BUT_SLOW" ]
}
if (is_clang) { if (is_clang) {
cflags = [ cflags = [
# tcmalloc initializes some fields in the wrong order. # tcmalloc initializes some fields in the wrong order.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment