extern crate jemalloc_ctl;
extern crate jemallocator;
extern crate libc;
use jemallocator::Jemalloc;
#[global_allocator]
static A: Jemalloc = Jemalloc;
fn background_threads() -> bool {
jemalloc_ctl::opt::background_thread::read().unwrap()
}
#[test]
fn background_threads_runtime_defaults() {
if !cfg!(feature = "background_threads_runtime_support") {
assert_eq!(background_threads(), false);
return;
}
if cfg!(feature = "background_threads") {
assert_eq!(background_threads(), true);
} else {
assert_eq!(background_threads(), false);
}
}