diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-13 16:49:23 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-13 16:49:23 +0000 |
commit | 42221b97a8bdfcbe2f12218f44beef617bf79250 (patch) | |
tree | 098658f76f4c3dca4f02865f5a3dad1ff62f5f4f /third_party/tcmalloc | |
parent | 7b2d3f50076df1dd611fbd6de785dd24f70acbe3 (diff) | |
download | chromium_src-42221b97a8bdfcbe2f12218f44beef617bf79250.zip chromium_src-42221b97a8bdfcbe2f12218f44beef617bf79250.tar.gz chromium_src-42221b97a8bdfcbe2f12218f44beef617bf79250.tar.bz2 |
Enable TCMalloc doubly-linked freelist in release buildsBUG=NoneTEST=None
Review URL: http://codereview.chromium.org/8242017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105312 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/tcmalloc')
-rw-r--r-- | third_party/tcmalloc/chromium/src/free_list.cc | 4 | ||||
-rw-r--r-- | third_party/tcmalloc/chromium/src/free_list.h | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/third_party/tcmalloc/chromium/src/free_list.cc b/third_party/tcmalloc/chromium/src/free_list.cc index 12f9b96..842f391 100644 --- a/third_party/tcmalloc/chromium/src/free_list.cc +++ b/third_party/tcmalloc/chromium/src/free_list.cc @@ -59,11 +59,11 @@ // head to NULL. -#ifdef TCMALLOC_USE_DOUBLYLINKED_FREELIST - #include <stddef.h> #include "free_list.h" +#if defined(TCMALLOC_USE_DOUBLYLINKED_FREELIST) + // TODO(jar): We should use C++ rather than a macro here. #define MEMORY_CHECK(v1, v2) \ if (v1 != v2) CRASH("Memory corruption detected.\n") diff --git a/third_party/tcmalloc/chromium/src/free_list.h b/third_party/tcmalloc/chromium/src/free_list.h index 2b29052..e1a88af 100644 --- a/third_party/tcmalloc/chromium/src/free_list.h +++ b/third_party/tcmalloc/chromium/src/free_list.h @@ -43,9 +43,12 @@ #include "internal_logging.h" // For CRASH() macro. #include "linked_list.h" +// Remove to enable singly linked lists (the default for open source tcmalloc). +#define TCMALLOC_USE_DOUBLYLINKED_FREELIST + namespace tcmalloc { -#ifdef TCMALLOC_USE_DOUBLYLINKED_FREELIST +#if defined(TCMALLOC_USE_DOUBLYLINKED_FREELIST) // size class information for common.h. static const bool kSupportsDoublyLinkedList = true; |