mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
Join jemalloc background threads prior to exit.
Co-authored-by: Jade Ellis <jade@ellis.link> Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -274,6 +274,10 @@ pub fn set_dirty_decay<I: Into<Option<usize>>>(arena: I, decay_ms: isize) -> Res
|
||||
}
|
||||
}
|
||||
|
||||
pub fn background_thread_enable(enable: bool) -> Result<bool> {
|
||||
set::<u8>(&mallctl!("background_thread"), enable.into()).map(is_nonzero!())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn is_affine_arena() -> bool { is_percpu_arena() || is_phycpu_arena() }
|
||||
|
||||
Reference in New Issue
Block a user