From 4a24d0b63c51031f7f53c6589f1cf5bcf396443d Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 4 May 2020 11:46:12 +0900 Subject: [PATCH] Turn off allocator by default --- build/config/allocator.gni | 6 ++++-- scripts/bootstrap.js | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/config/allocator.gni b/build/config/allocator.gni index 8954e45..d8df8fd 100644 --- a/build/config/allocator.gni +++ b/build/config/allocator.gni @@ -26,10 +26,12 @@ if ((is_linux || is_android || is_mac || declare_args() { # Memory allocator to use. Set to "none" to use default allocator. - use_allocator = _default_allocator + # Yue: Turn off allocator by default. + use_allocator = "none" # Causes all the allocations to be routed via allocator_shim.cc. - use_allocator_shim = _default_use_allocator_shim + # Yue: Turn off allocator by default. + use_allocator_shim = false # Partition alloc is included by default except iOS. use_partition_alloc = !is_ios diff --git a/scripts/bootstrap.js b/scripts/bootstrap.js index 45fff78..366bd2e 100755 --- a/scripts/bootstrap.js +++ b/scripts/bootstrap.js @@ -47,6 +47,7 @@ if (targetOs == 'linux') { debugConfig.push('enable_iterator_debugging=false') // Use prebuilt clang binaries. commonConfig.push('is_clang=true') + commonConfig.push('use_allocator="tcmalloc"') // Link with libc++ statically. commonConfig.push('use_custom_libcxx=true') releaseConfig.push('libcpp_is_static=true')