1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/sanitizers/sanitizers.gni")
7 if (is_android || current_cpu == "mipsel" || is_mac || is_ios || is_asan ||
8 is_lsan || is_tsan || is_msan || is_win || is_syzyasan) {
9 _default_allocator = "none"
11 _default_allocator = "tcmalloc"
15 # Memory allocator to use. Set to "none" to use default allocator.
16 use_allocator = _default_allocator
19 assert(use_allocator == "none" || use_allocator == "tcmalloc")
21 assert(!is_win || use_allocator == "none", "Tcmalloc doesn't work on Windows.")