summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/mozjs/jscustomallocator.cpp
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2017-02-26 15:15:08 -0500
committerAndrew Morrow <acm@mongodb.com>2017-08-02 23:29:55 -0400
commita8a1ea3b9367adb6d0b65a7da21fed89598ea093 (patch)
tree8e969ed54b88c2a9c4c2d45a6518d053ac9f4265 /src/mongo/scripting/mozjs/jscustomallocator.cpp
parentc02c14e30d75b02894da116f4bb1a71652ead2b4 (diff)
downloadmongo-a8a1ea3b9367adb6d0b65a7da21fed89598ea093.tar.gz
SERVER-26538 SERVER-26539 Detach from boost::thread
Also, use thread_local everywhere for our thread specific data needs and remove the legacy support.
Diffstat (limited to 'src/mongo/scripting/mozjs/jscustomallocator.cpp')
-rw-r--r--src/mongo/scripting/mozjs/jscustomallocator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/scripting/mozjs/jscustomallocator.cpp b/src/mongo/scripting/mozjs/jscustomallocator.cpp
index 00f5f404fc4..aab9260a9ba 100644
--- a/src/mongo/scripting/mozjs/jscustomallocator.cpp
+++ b/src/mongo/scripting/mozjs/jscustomallocator.cpp
@@ -34,7 +34,6 @@
#include "mongo/config.h"
#include "mongo/scripting/mozjs/implscope.h"
-#include "mongo/util/concurrency/threadlocal.h"
#ifdef __linux__
#include <malloc.h>
@@ -72,8 +71,8 @@ namespace {
* maximum number of bytes we will consider handing out. They are set by
* MozJSImplScope on start up.
*/
-MONGO_TRIVIALLY_CONSTRUCTIBLE_THREAD_LOCAL size_t total_bytes;
-MONGO_TRIVIALLY_CONSTRUCTIBLE_THREAD_LOCAL size_t max_bytes;
+thread_local size_t total_bytes = 0;
+thread_local size_t max_bytes = 0;
/**
* When we don't have malloc_usable_size, we manage by adjusting our pointer by