1 // Work around https://github.com/gnzlbg/jemallocator/issues/19 2 #[global_allocator] 3 static A: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; 4 5 #[test] smoke()6fn smoke() { 7 unsafe { 8 let ptr = tikv_jemalloc_sys::malloc(4); 9 *(ptr as *mut u32) = 0xDECADE; 10 assert_eq!(*(ptr as *mut u32), 0xDECADE); 11 tikv_jemalloc_sys::free(ptr); 12 } 13 } 14