diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-03-29 19:35:27 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-03-31 19:36:33 -0400 |
commit | 02a9fd0daf29dbd0557d51701444bd95a43868f1 (patch) | |
tree | 0447e21f6b1899b0af2292ca5fa8d2d4d996ca04 /src/mongo/util/tcmalloc_server_status_section.cpp | |
parent | 81b5ee3d389e67b4460417a8c701436fe49e4950 (diff) | |
download | mongo-02a9fd0daf29dbd0557d51701444bd95a43868f1.tar.gz |
SERVER-17465 Do not attempt to use tcmalloc customizations with system tcmalloc
Diffstat (limited to 'src/mongo/util/tcmalloc_server_status_section.cpp')
-rw-r--r-- | src/mongo/util/tcmalloc_server_status_section.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/util/tcmalloc_server_status_section.cpp b/src/mongo/util/tcmalloc_server_status_section.cpp index 8b5ca0ba649..6ad075f7c26 100644 --- a/src/mongo/util/tcmalloc_server_status_section.cpp +++ b/src/mongo/util/tcmalloc_server_status_section.cpp @@ -29,7 +29,7 @@ #include "mongo/platform/basic.h" -#include <third_party/gperftools-2.2/src/gperftools/malloc_extension.h> +#include "gperftools/malloc_extension.h" #include "mongo/base/init.h" #include "mongo/db/commands/server_status.h" @@ -57,6 +57,7 @@ namespace { return; } +#if MONGO_HAVE_GPERFTOOLS_GET_THREAD_CACHE_SIZE size_t threadCacheSizeBytes = MallocExtension::instance()->GetThreadCacheSize(); static const size_t kMaxThreadCacheSizeBytes = 0x10000; @@ -69,6 +70,7 @@ namespace { LOG(1) << "thread over memory limit, cleaning up, current: " << (threadCacheSizeBytes/1024) << "k"; +#endif // We synchronize as the tcmalloc central list uses a spinlock, and we can cause a really // terrible runaway if we're not careful. |