diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-03-29 19:35:27 -0400 |
---|---|---|
committer | Ramon Fernandez <ramon.fernandez@mongodb.com> | 2015-04-20 14:42:08 -0400 |
commit | c09d38c2de92bb0227cc273767ec4a9c22702cc0 (patch) | |
tree | c24f7efd2c1a79436275c10a2eb9dfd43017fba3 /src/mongo/util | |
parent | ca9aed9d8ed7cba741064304038dc8d10752926f (diff) | |
download | mongo-c09d38c2de92bb0227cc273767ec4a9c22702cc0.tar.gz |
SERVER-17465 Do not attempt to use tcmalloc customizations with system tcmalloc
(cherry picked from commit 02a9fd0daf29dbd0557d51701444bd95a43868f1)
Diffstat (limited to 'src/mongo/util')
-rw-r--r-- | src/mongo/util/tcmalloc_server_status_section.cpp | 4 | ||||
-rw-r--r-- | src/mongo/util/tcmalloc_set_parameter.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/util/tcmalloc_server_status_section.cpp b/src/mongo/util/tcmalloc_server_status_section.cpp index ab12f6c98b2..2ce4018e6f8 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. diff --git a/src/mongo/util/tcmalloc_set_parameter.cpp b/src/mongo/util/tcmalloc_set_parameter.cpp index c0d7a912e04..137b368ca8a 100644 --- a/src/mongo/util/tcmalloc_set_parameter.cpp +++ b/src/mongo/util/tcmalloc_set_parameter.cpp @@ -28,7 +28,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/disallow_copying.h" #include "mongo/base/init.h" |