// includes and uses fbstring.
#if defined(_GLIBCXX_USE_FB) && !defined(_LIBSTDCXX_FBSTRING)
-#include <folly/detail/Malloc.h>
+#include <folly/detail/MallocImpl.h>
#include <folly/portability/BitsFunctexcept.h>
#include <string>
/**
* Declare *allocx() and mallctl*() as weak symbols. These will be provided by
- * jemalloc if we are using jemalloc, or will be NULL if we are using another
+ * jemalloc if we are using jemalloc, or will be nullptr if we are using another
* malloc implementation.
*/
extern "C" void* mallocx(size_t, int)
#else // !defined(_LIBSTDCXX_FBSTRING)
-#include <folly/detail/Malloc.h> /* nolint */
+#include <folly/detail/MallocImpl.h> /* nolint */
#include <folly/portability/BitsFunctexcept.h> /* nolint */
#endif
* Determine if we are using jemalloc or not.
*/
FOLLY_MALLOC_NOINLINE inline bool usingJEMalloc() noexcept {
- // Checking for rallocx != NULL is not sufficient; we may be in a dlopen()ed
- // module that depends on libjemalloc, so rallocx is resolved, but the main
- // program might be using a different memory allocator.
+ // Checking for rallocx != nullptr is not sufficient; we may be in a
+ // dlopen()ed module that depends on libjemalloc, so rallocx is resolved, but
+ // the main program might be using a different memory allocator.
// How do we determine that we're using jemalloc? In the hackiest
// way possible. We allocate memory using malloc() and see if the
// per-thread counter of allocated memory increases. This makes me