+#else
+ const auto key =
+ folly::to<std::string>("arena.", arena_index_, ".extent_hooks");
+ extent_hooks_t* hooks;
+ len = sizeof(hooks);
+ // Read the existing hooks
+ if (auto ret = mallctl(key.c_str(), &hooks, &len, nullptr, 0)) {
+ LOG(FATAL) << "Unable to get the hooks: " << errnoStr(ret);
+ }
+ if (original_alloc_ == nullptr) {
+ original_alloc_ = hooks->alloc;
+ } else {
+ DCHECK_EQ(original_alloc_, hooks->alloc);
+ }
+
+ // Set the custom hook
+ hooks->alloc = &JemallocNodumpAllocator::alloc;
+#endif