1diff --git a/src/lib.rs b/src/lib.rs 2index 58010af..0f9f795 100644 3--- a/src/lib.rs 4+++ b/src/lib.rs 5@@ -144,7 +144,7 @@ extern "C" { 6 /// 7 /// If the space cannot be allocated, a null pointer is returned and `errno` 8 /// is set to `ENOMEM`. 9- #[cfg_attr(prefixed, link_name = "_rjem_malloc")] 10+ #[cfg_attr(prefixed, link_name = "je_malloc")] 11 pub fn malloc(size: size_t) -> *mut c_void; 12 /// Allocates zero-initialized space for an array of `number` objects, each 13 /// of whose size is `size`. 14@@ -155,7 +155,7 @@ extern "C" { 15 /// 16 /// Note: zero-initialized memory need not be the same as the 17 /// representation of floating-point zero or a null pointer constant. 18- #[cfg_attr(prefixed, link_name = "_rjem_calloc")] 19+ #[cfg_attr(prefixed, link_name = "je_calloc")] 20 pub fn calloc(number: size_t, size: size_t) -> *mut c_void; 21 22 /// Allocates `size` bytes of memory at an address which is a multiple of 23@@ -179,7 +179,7 @@ extern "C" { 24 /// The behavior is _undefined_ if: 25 /// 26 /// * `ptr` is null. 27- #[cfg_attr(prefixed, link_name = "_rjem_posix_memalign")] 28+ #[cfg_attr(prefixed, link_name = "je_posix_memalign")] 29 pub fn posix_memalign(ptr: *mut *mut c_void, alignment: size_t, size: size_t) -> c_int; 30 31 /// Allocates `size` bytes of memory at an address which is a multiple of 32@@ -199,7 +199,7 @@ extern "C" { 33 /// 34 /// * `alignment` is not a power-of-two 35 /// * `size` is not an integral multiple of `alignment` 36- #[cfg_attr(prefixed, link_name = "_rjem_aligned_alloc")] 37+ #[cfg_attr(prefixed, link_name = "je_aligned_alloc")] 38 pub fn aligned_alloc(alignment: size_t, size: size_t) -> *mut c_void; 39 40 /// Resizes the previously-allocated memory region referenced by `ptr` to 41@@ -238,7 +238,7 @@ extern "C" { 42 /// * `ptr` does not match a pointer previously returned by the memory 43 /// allocation functions of this crate, or 44 /// * the memory region referenced by `ptr` has been deallocated. 45- #[cfg_attr(prefixed, link_name = "_rjem_realloc")] 46+ #[cfg_attr(prefixed, link_name = "je_realloc")] 47 pub fn realloc(ptr: *mut c_void, size: size_t) -> *mut c_void; 48 49 /// Deallocates previously-allocated memory region referenced by `ptr`. 50@@ -254,7 +254,7 @@ extern "C" { 51 /// * `ptr` does not match a pointer earlier returned by the memory 52 /// allocation functions of this crate, or 53 /// * the memory region referenced by `ptr` has been deallocated. 54- #[cfg_attr(prefixed, link_name = "_rjem_free")] 55+ #[cfg_attr(prefixed, link_name = "je_free")] 56 pub fn free(ptr: *mut c_void); 57 58 /// Allocates at least `size` bytes of memory according to `flags`. 59@@ -274,7 +274,7 @@ extern "C" { 60 /// # Safety 61 /// 62 /// The behavior is _undefined_ if `size == 0`. 63- #[cfg_attr(prefixed, link_name = "_rjem_mallocx")] 64+ #[cfg_attr(prefixed, link_name = "je_mallocx")] 65 pub fn mallocx(size: size_t, flags: c_int) -> *mut c_void; 66 67 /// Resizes the previously-allocated memory region referenced by `ptr` to be 68@@ -307,7 +307,7 @@ extern "C" { 69 /// * `ptr` does not match a pointer earlier returned by 70 /// the memory allocation functions of this crate, or 71 /// * the memory region referenced by `ptr` has been deallocated. 72- #[cfg_attr(prefixed, link_name = "_rjem_rallocx")] 73+ #[cfg_attr(prefixed, link_name = "je_rallocx")] 74 pub fn rallocx(ptr: *mut c_void, size: size_t, flags: c_int) -> *mut c_void; 75 76 /// Resizes the previously-allocated memory region referenced by `ptr` _in 77@@ -348,7 +348,7 @@ extern "C" { 78 /// * `ptr` does not match a pointer earlier returned by the memory 79 /// allocation functions of this crate, or 80 /// * the memory region referenced by `ptr` has been deallocated. 81- #[cfg_attr(prefixed, link_name = "_rjem_xallocx")] 82+ #[cfg_attr(prefixed, link_name = "je_xallocx")] 83 pub fn xallocx(ptr: *mut c_void, size: size_t, extra: size_t, flags: c_int) -> size_t; 84 85 /// Returns the real size of the previously-allocated memory region 86@@ -363,7 +363,7 @@ extern "C" { 87 /// * `ptr` does not match a pointer earlier returned by the memory 88 /// allocation functions of this crate, or 89 /// * the memory region referenced by `ptr` has been deallocated. 90- #[cfg_attr(prefixed, link_name = "_rjem_sallocx")] 91+ #[cfg_attr(prefixed, link_name = "je_sallocx")] 92 pub fn sallocx(ptr: *const c_void, flags: c_int) -> size_t; 93 94 /// Deallocates previously-allocated memory region referenced by `ptr`. 95@@ -378,7 +378,7 @@ extern "C" { 96 /// allocation functions of this crate, or 97 /// * `ptr` is null, or 98 /// * the memory region referenced by `ptr` has been deallocated. 99- #[cfg_attr(prefixed, link_name = "_rjem_dallocx")] 100+ #[cfg_attr(prefixed, link_name = "je_dallocx")] 101 pub fn dallocx(ptr: *mut c_void, flags: c_int); 102 103 /// Deallocates previously-allocated memory region referenced by `ptr` with 104@@ -398,7 +398,7 @@ extern "C" { 105 /// allocation functions of this crate, or 106 /// * `ptr` is null, or 107 /// * the memory region referenced by `ptr` has been deallocated. 108- #[cfg_attr(prefixed, link_name = "_rjem_sdallocx")] 109+ #[cfg_attr(prefixed, link_name = "je_sdallocx")] 110 pub fn sdallocx(ptr: *mut c_void, size: size_t, flags: c_int); 111 112 /// Returns the real size of the allocation that would result from a 113@@ -412,7 +412,7 @@ extern "C" { 114 /// # Safety 115 /// 116 /// The behavior is _undefined_ if `size == 0`. 117- #[cfg_attr(prefixed, link_name = "_rjem_nallocx")] 118+ #[cfg_attr(prefixed, link_name = "je_nallocx")] 119 pub fn nallocx(size: size_t, flags: c_int) -> size_t; 120 121 /// Returns the real size of the previously-allocated memory region 122@@ -437,7 +437,7 @@ extern "C" { 123 /// * `ptr` does not match a pointer earlier returned by the memory 124 /// allocation functions of this crate, or 125 /// * the memory region referenced by `ptr` has been deallocated. 126- #[cfg_attr(prefixed, link_name = "_rjem_malloc_usable_size")] 127+ #[cfg_attr(prefixed, link_name = "je_malloc_usable_size")] 128 pub fn malloc_usable_size(ptr: *const c_void) -> size_t; 129 130 /// General interface for introspecting the memory allocator, as well as 131@@ -470,7 +470,7 @@ extern "C" { 132 /// directly related to `mallctl` read/write processing. 133 /// 134 /// [jemalloc_mallctl]: http://jemalloc.net/jemalloc.3.html#mallctl_namespace 135- #[cfg_attr(prefixed, link_name = "_rjem_mallctl")] 136+ #[cfg_attr(prefixed, link_name = "je_mallctl")] 137 pub fn mallctl( 138 name: *const c_char, 139 oldp: *mut c_void, 140@@ -492,11 +492,11 @@ extern "C" { 141 /// a complete MIB. For name components that are integers (e.g. the 2 in 142 /// arenas.bin.2.size), the corresponding MIB component will always be that 143 /// integer. 144- #[cfg_attr(prefixed, link_name = "_rjem_mallctlnametomib")] 145+ #[cfg_attr(prefixed, link_name = "je_mallctlnametomib")] 146 pub fn mallctlnametomib(name: *const c_char, mibp: *mut size_t, miblenp: *mut size_t) -> c_int; 147 148 /// Like [`mallctl`] but taking a `mib` as input instead of a name. 149- #[cfg_attr(prefixed, link_name = "_rjem_mallctlbymib")] 150+ #[cfg_attr(prefixed, link_name = "je_mallctlbymib")] 151 pub fn mallctlbymib( 152 mib: *const size_t, 153 miblen: size_t, 154@@ -533,7 +533,7 @@ extern "C" { 155 /// Note that thread caching may prevent some statistics from being 156 /// completely up to date, since extra locking would be required to merge 157 /// counters that track thread cache operations. 158- #[cfg_attr(prefixed, link_name = "_rjem_malloc_stats_print")] 159+ #[cfg_attr(prefixed, link_name = "je_malloc_stats_print")] 160 pub fn malloc_stats_print( 161 write_cb: Option<unsafe extern "C" fn(*mut c_void, *const c_char)>, 162 cbopaque: *mut c_void, 163@@ -550,7 +550,7 @@ extern "C" { 164 /// 165 /// Please note that doing anything which tries to allocate memory in this 166 /// function is likely to result in a crash or deadlock. 167- #[cfg_attr(prefixed, link_name = "_rjem_malloc_message")] 168+ #[cfg_attr(prefixed, link_name = "je_malloc_message")] 169 pub static mut malloc_message: 170 Option<unsafe extern "C" fn(cbopaque: *mut c_void, s: *const c_char)>; 171 172@@ -580,7 +580,7 @@ extern "C" { 173 /// Some options have boolean values (`true`/`false`), others have integer 174 /// values (base `8`, `10`, or `16`, depending on prefix), and yet others 175 /// have raw string values. 176- #[cfg_attr(prefixed, link_name = "_rjem_malloc_conf")] 177+ #[cfg_attr(prefixed, link_name = "je_malloc_conf")] 178 pub static malloc_conf: Option<&'static c_char>; 179 } 180 181