#include <glog/logging.h>
#include <folly/Memory.h>
-#include <folly/SmallLocks.h>
+#include <folly/MicroSpinLock.h>
#include <folly/ThreadLocal.h>
namespace folly { namespace detail {
template<typename NodeAlloc>
static constexpr bool destroyIsNoOp() {
return IsArenaAllocator<NodeAlloc>::value &&
- boost::has_trivial_destructor<std::atomic<SkipListNode*>>::value;
+ boost::has_trivial_destructor<SkipListNode>::value;
}
// copy the head node to a new head node assuming lock acquired
explicit NodeRecycler(const NodeAlloc& alloc)
: refs_(0), dirty_(false), alloc_(alloc) { lock_.init(); }
+ explicit NodeRecycler() : refs_(0), dirty_(false) { lock_.init(); }
+
~NodeRecycler() {
CHECK_EQ(refs(), 0);
if (nodes_) {
void addRef() { }
void releaseRef() { }
- void add(NodeType* node) { }
+ void add(NodeType* /* node */) {}
NodeAlloc& alloc() { return alloc_; }