mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-28 07:14:52 +00:00
Fixup
This commit is contained in:
Generated
+3
-2
@@ -689,9 +689,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.174"
|
||||
version = "0.2.186"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
|
||||
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
||||
|
||||
[[package]]
|
||||
name = "libm"
|
||||
@@ -1330,6 +1330,7 @@ dependencies = [
|
||||
"icu_segmenter",
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"mime",
|
||||
"once_cell",
|
||||
|
||||
@@ -69,6 +69,7 @@ tikv-jemallocator = { version = "0.6.1", features = [
|
||||
tikv-jemalloc-sys = { version = "0.6.1", features = [
|
||||
"disable_initial_exec_tls",
|
||||
] }
|
||||
libc = "0.2.186"
|
||||
|
||||
[build-dependencies]
|
||||
blake2 = "0.10.4"
|
||||
|
||||
+12
-10
@@ -20,6 +20,8 @@ pub mod rendezvous;
|
||||
pub mod room_versions;
|
||||
pub mod segmenter;
|
||||
|
||||
use libc::{c_char, c_int, c_void, size_t};
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: Jemalloc = Jemalloc;
|
||||
|
||||
@@ -92,32 +94,32 @@ impl<T> UnwrapInfallible<T> for Result<T, Infallible> {
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn malloc(size: usize) -> *mut std::ffi::c_void {
|
||||
pub unsafe extern "C" fn malloc(size: size_t) -> *mut c_void {
|
||||
tikv_jemalloc_sys::malloc(size)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn calloc(number: usize, size: usize) -> *mut std::ffi::c_void {
|
||||
pub unsafe extern "C" fn calloc(number: size_t, size: size_t) -> *mut 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 {
|
||||
pub unsafe extern "C" fn realloc(ptr: *mut c_void, size: size_t) -> *mut c_void {
|
||||
tikv_jemalloc_sys::realloc(ptr, size)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn free(ptr: *mut std::ffi::c_void) {
|
||||
pub unsafe extern "C" fn free(ptr: *mut 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 {
|
||||
name: *const c_char,
|
||||
oldp: *mut c_void,
|
||||
oldlenp: *mut size_t,
|
||||
newp: *mut c_void,
|
||||
newlen: size_t,
|
||||
) -> c_int {
|
||||
tikv_jemalloc_sys::mallctl(name, oldp, oldlenp, newp, newlen)
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ def _setup_jemalloc_stats() -> None:
|
||||
|
||||
# We're looking for a path at the end of the line that includes
|
||||
# "libjemalloc".
|
||||
regex = re.compile(r"/\S+/libjemalloc.*$")
|
||||
regex = re.compile(r"/\S+/synapse_rust\.abi3\.so$")
|
||||
|
||||
jemalloc_path = None
|
||||
with open("/proc/self/maps") as f:
|
||||
|
||||
Reference in New Issue
Block a user