mirror of
https://github.com/element-hq/synapse.git
synced 2026-05-24 17:25:22 +00:00
Try redefining
This commit is contained in:
Generated
+1
@@ -1342,6 +1342,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"tikv-jemalloc-sys",
|
||||
"tikv-jemallocator",
|
||||
"tokio",
|
||||
"ulid",
|
||||
|
||||
+7
-1
@@ -65,10 +65,16 @@ once_cell = "1.18.0"
|
||||
itertools = "0.14.0"
|
||||
tikv-jemallocator = { version = "0.6.1", features = [
|
||||
"disable_initial_exec_tls",
|
||||
"unprefixed_malloc_on_supported_platforms",
|
||||
] }
|
||||
tikv-jemalloc-sys = { version = "0.6.1", features = [
|
||||
"disable_initial_exec_tls",
|
||||
] }
|
||||
|
||||
[build-dependencies]
|
||||
blake2 = "0.10.4"
|
||||
hex = "0.4.3"
|
||||
rustc_version = "0.4.1"
|
||||
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
rustflags = ["-C", "link-arg=-Wl,--version-script=export.map"]
|
||||
|
||||
@@ -90,3 +90,34 @@ impl<T> UnwrapInfallible<T> for Result<T, Infallible> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn malloc(size: usize) -> *mut std::ffi::c_void {
|
||||
tikv_jemalloc_sys::malloc(size)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn calloc(number: usize, size: usize) -> *mut std::ffi::c_void {
|
||||
tikv_jemalloc_sys::calloc(number, size)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn realloc(ptr: *mut std::ffi::c_void, size: usize) -> *mut std::ffi::c_void {
|
||||
tikv_jemalloc_sys::realloc(ptr, size)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn free(ptr: *mut std::ffi::c_void) {
|
||||
tikv_jemalloc_sys::free(ptr)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn mallctl(
|
||||
name: *const std::ffi::c_char,
|
||||
oldp: *mut std::ffi::c_void,
|
||||
oldlenp: *mut usize,
|
||||
newp: *mut std::ffi::c_void,
|
||||
newlen: usize,
|
||||
) -> i32 {
|
||||
tikv_jemalloc_sys::mallctl(name, oldp, oldlenp, newp, newlen)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user