+
+ // allocator
+ // NOTE: These need to be mentioned here despite not being part of compiler_builtins because
+ // newer glibc resolve dlsym("malloc") to libc.so despite the override in the rustc binary to
+ // use jemalloc. Libraries opened with dlopen still get the jemalloc version, causing multiple
+ // allocators to be mixed, resulting in a crash.
+ fn calloc(nobj: size_t, size: size_t) -> *mut c_void;
+ #[cfg(unix)]
+ fn posix_memalign(memptr: *mut *mut c_void, align: size_t, size: size_t) -> c_int;
+ fn malloc(size: size_t) -> *mut c_void;
+ fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
+ fn free(p: *mut c_void) -> ();
+