X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FConcurrentSkipList-inl.h;h=227a3325071df932d3154c4c5b1d6f172388b5a9;hb=9b4749fd47c605c27b6973f317d7c4f3a0e101e9;hp=c303ac0384972803e731c39a9f59df3a2e87d8da;hpb=ac2aa280f7c225dc0229624e37719b2435de6c36;p=folly.git diff --git a/folly/ConcurrentSkipList-inl.h b/folly/ConcurrentSkipList-inl.h index c303ac03..227a3325 100644 --- a/folly/ConcurrentSkipList-inl.h +++ b/folly/ConcurrentSkipList-inl.h @@ -32,9 +32,9 @@ #include #include -#include "folly/Memory.h" -#include "folly/SmallLocks.h" -#include "folly/ThreadLocal.h" +#include +#include +#include namespace folly { namespace detail { @@ -234,7 +234,7 @@ class NodeRecycler()>::type> { public: explicit NodeRecycler(const NodeAlloc& alloc) - : alloc_(alloc), refs_(0), dirty_(false) { lock_.init(); } + : refs_(0), dirty_(false), alloc_(alloc) { lock_.init(); } ~NodeRecycler() { CHECK_EQ(refs(), 0); @@ -304,11 +304,11 @@ class NodeRecycler> nodes_; std::atomic refs_; // current number of visitors to the list std::atomic dirty_; // whether *nodes_ is non-empty MicroSpinLock lock_; // protects access to *nodes_ + NodeAlloc alloc_; }; // In case of arena allocator, no recycling is necessary, and it's possible