Consistency in namespace-closing comments
[folly.git] / folly / experimental / JemallocNodumpAllocator.cpp
index 8d29dbc82109e2c87f00ccda5a781ff4cddda9a3..91625a79a87db0a2b2e96ec9c04bc2815c816ecb 100644 (file)
@@ -91,8 +91,9 @@ bool JemallocNodumpAllocator::extend_and_setup_arena() {
   // Set the custom hook
   extent_hooks_ = *hooks;
   extent_hooks_.alloc = &JemallocNodumpAllocator::alloc;
-  if (auto ret =
-          mallctl(key.c_str(), nullptr, nullptr, &hooks, sizeof(hooks))) {
+  extent_hooks_t* new_hooks = &extent_hooks_;
+  if (auto ret = mallctl(
+          key.c_str(), nullptr, nullptr, &new_hooks, sizeof(new_hooks))) {
     LOG(FATAL) << "Unable to set the hooks: " << errnoStr(ret);
   }
 #endif
@@ -118,6 +119,7 @@ chunk_alloc_t* JemallocNodumpAllocator::original_alloc_ = nullptr;
 void* JemallocNodumpAllocator::alloc(
     void* chunk,
 #else
+extent_hooks_t JemallocNodumpAllocator::extent_hooks_;
 extent_alloc_t* JemallocNodumpAllocator::original_alloc_ = nullptr;
 void* JemallocNodumpAllocator::alloc(
     extent_hooks_t* extent,
@@ -163,4 +165,4 @@ JemallocNodumpAllocator& globalJemallocNodumpAllocator() {
   return *instance;
 }
 
-} // folly
+} // namespace folly