File: unprefixed_malloc.rs

package info (click to toggle)
rust-jemalloc-sys 0.3.2-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,680 kB
  • sloc: ansic: 67,947; perl: 4,138; sh: 3,716; makefile: 1,037; python: 359; cpp: 216; awk: 74
file content (14 lines) | stat: -rw-r--r-- 299 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate jemalloc_sys;
extern crate libc;

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

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