void MemoryManager::requestShutdown() { auto& profctx = MM().m_profctx; if (!profctx.flag) return; #ifdef USE_JEMALLOC jemalloc_pprof_dump(profctx.filename, true); mallctlWrite("thread.prof.active", profctx.thread_prof_active); mallctlWrite("prof.active", profctx.prof_active); #endif MM().m_bypassSlabAlloc = RuntimeOption::DisableSmallAllocator; MM().m_memThresholdCallbackPeakUsage = SIZE_MAX; profctx = ReqProfContext{}; }
void MemoryManager::requestShutdown() { auto& profctx = MM().m_profctx; if (!profctx.flag) return; #ifdef USE_JEMALLOC jemalloc_pprof_dump(profctx.filename, true); mallctl("thread.prof.active", nullptr, nullptr, &profctx.thread_prof_active, sizeof(bool)); mallctl("prof.active", nullptr, nullptr, &profctx.prof_active, sizeof(bool)); #endif profctx = ReqProfContext{}; }
void MemoryManager::requestShutdown() { auto& profctx = MM().m_profctx; if (!profctx.flag) return; #ifdef USE_JEMALLOC jemalloc_pprof_dump(profctx.filename, true); mallctl("thread.prof.active", nullptr, nullptr, &profctx.thread_prof_active, sizeof(bool)); mallctl("prof.active", nullptr, nullptr, &profctx.prof_active, sizeof(bool)); #endif MM().m_bypassSlabAlloc = RuntimeOption::DisableSmartAllocator; profctx = ReqProfContext{}; }