Commit 767d2055 authored by Gabriel Marin's avatar Gabriel Marin Committed by Commit Bot

tcmalloc: enable doubly-linked lists and disable huge allocations via build file

Moves the macro defines for enabling doubly-linked free lists and for disabling
huge allocations in tcmalloc to the build file. This makes it easier to uprev
tcmalloc from gperftools where these features are implemeneted, but not enabled
by default.

BUG=724399,b:70905156

Change-Id: Ie84407583227baeddeef6bcf5eb9a825dbc6ddd2
Reviewed-on: https://chromium-review.googlesource.com/1187381
Commit-Queue: Gabriel Marin <gmx@chromium.org>
Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585623}
parent c86aa801
......@@ -28,7 +28,10 @@ group("allocator") {
}
config("tcmalloc_flags") {
defines = []
defines = [
"TCMALLOC_USE_DOUBLYLINKED_FREELIST",
"TCMALLOC_DISABLE_HUGE_ALLOCATIONS",
]
if (enable_debugallocation) {
defines += [
# Use debugallocation for Debug builds to catch problems early
......
......@@ -44,9 +44,6 @@
#include "linked_list.h"
#include "system-alloc.h"
// Remove to enable singly linked lists (the default for open source tcmalloc).
#define TCMALLOC_USE_DOUBLYLINKED_FREELIST
namespace tcmalloc {
#if defined(TCMALLOC_USE_DOUBLYLINKED_FREELIST)
......
......@@ -135,9 +135,6 @@
#include "maybe_emergency_malloc.h"
// Remove to enable huge allocations (> 2GB), the default for gperftools.
#define TCMALLOC_DISABLE_HUGE_ALLOCATIONS
#if (defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)) && !defined(WIN32_OVERRIDE_ALLOCATORS)
# define WIN32_DO_PATCHING 1
#endif
......
......@@ -44,9 +44,6 @@
#include "linked_list.h"
#include "system-alloc.h"
// Remove to enable singly linked lists (the default for open source tcmalloc).
#define TCMALLOC_USE_DOUBLYLINKED_FREELIST
namespace tcmalloc {
#if defined(TCMALLOC_USE_DOUBLYLINKED_FREELIST)
......
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