mirror of
https://github.com/girlbossceo/jemallocator.git
synced 2024-12-03 05:55:00 +00:00
15 lines
253 B
Rust
15 lines
253 B
Rust
|
#![feature(global_allocator)]
|
||
|
|
||
|
extern crate jemallocator;
|
||
|
|
||
|
use jemallocator::Jemalloc;
|
||
|
|
||
|
#[global_allocator]
|
||
|
static A: Jemalloc = Jemalloc;
|
||
|
|
||
|
#[test]
|
||
|
fn smoke() {
|
||
|
let a = Box::new(3_u32);
|
||
|
assert!(unsafe { jemallocator::usable_size(&*a) } >= 4);
|
||
|
}
|