fix jemalloc prof feature (#1201)

This commit is contained in:
Sijie.Sun
2025-08-08 17:54:39 +08:00
committed by GitHub
parent e3e406dcde
commit 6d14e9e441
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -52,6 +52,11 @@ use jemalloc_ctl::{epoch, stats, Access as _, AsName as _};
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
#[cfg(feature = "jemalloc-prof")]
#[allow(non_upper_case_globals)]
#[export_name = "malloc_conf"]
pub static malloc_conf: &[u8] = b"prof:true,prof_active:true,lg_prof_sample:19\0";
fn set_prof_active(_active: bool) {
#[cfg(feature = "jemalloc-prof")]
{