jemallocator/jemalloc-sys/tests/unprefixed_malloc.rs
Jay 510c5f0b84
*: update project meta (#2)
As we are going to publish the crate to crates.io, we need a different
name and version. Since native library is upgraded, all versions are
bumpped to 0.4.0. To make it clear which version of jemalloc is used, I
attach a build tag 5.2.1.

And the project are upgraded to 2018 version.

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
2020-07-21 19:33:59 +08:00

12 lines
262 B
Rust

#[cfg(prefixed)]
#[test]
fn malloc_is_prefixed() {
assert_ne!(tikv_jemalloc_sys::malloc as usize, libc::malloc as usize)
}
#[cfg(not(prefixed))]
#[test]
fn malloc_is_overridden() {
assert_eq!(tikv_jemalloc_sys::malloc as usize, libc::malloc as usize)
}