jemallocator/tests/usable_size.rs

15 lines
253 B
Rust
Raw Normal View History

#![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);
}