diff --git a/Cargo.lock b/Cargo.lock index 38e42340bc0..4c51ec54272 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3233,26 +3233,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" -[[package]] -name = "jemalloc-sys" -version = "0.5.4+5.3.0-patched" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "jemallocator" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0de374a9f8e63150e6f5e8a60cc14c668226d7a347d8aee1a45766e3c4dd3bc" -dependencies = [ - "jemalloc-sys", - "libc", -] - [[package]] name = "jni" version = "0.21.1" @@ -4808,7 +4788,6 @@ name = "profile" version = "0.0.1" dependencies = [ "ipc-channel", - "jemalloc-sys", "libc", "profile_traits", "regex", @@ -4816,6 +4795,7 @@ dependencies = [ "serde_json", "servo_config", "task_info", + "tikv-jemalloc-sys", ] [[package]] @@ -5698,9 +5678,9 @@ dependencies = [ name = "servo_allocator" version = "0.0.1" dependencies = [ - "jemalloc-sys", - "jemallocator", "libc", + "tikv-jemalloc-sys", + "tikv-jemallocator", "windows-sys 0.52.0", ] @@ -6432,6 +6412,26 @@ dependencies = [ "weezl", ] +[[package]] +name = "tikv-jemalloc-sys" +version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cec5ff18518d81584f477e9bfdf957f5bb0979b0bac3af4ca30b5b3ae2d2865" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + [[package]] name = "time" version = "0.1.45" diff --git a/Cargo.toml b/Cargo.toml index 0c2702f7aca..e011617bb31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,8 +69,8 @@ imsz = "0.2" indexmap = { version = "2.2.6", features = ["std"] } ipc-channel = "0.18" itertools = "0.13" -jemalloc-sys = "0.5.4" -jemallocator = "0.5.4" +tikv-jemalloc-sys = "0.6.0" +tikv-jemallocator = "0.6.0" keyboard-types = "0.7" lazy_static = "1.5" libc = "0.2" diff --git a/components/allocator/Cargo.toml b/components/allocator/Cargo.toml index 3c8ab902dc8..2095377bfa8 100644 --- a/components/allocator/Cargo.toml +++ b/components/allocator/Cargo.toml @@ -13,8 +13,8 @@ path = "lib.rs" use-system-allocator = ["libc"] [target.'cfg(not(any(windows, target_env = "ohos")))'.dependencies] -jemallocator = { workspace = true } -jemalloc-sys = { workspace = true } +tikv-jemallocator = { workspace = true } +tikv-jemalloc-sys = { workspace = true } libc = { workspace = true, optional = true } [target.'cfg(windows)'.dependencies] diff --git a/components/allocator/lib.rs b/components/allocator/lib.rs index aa7f6b1e99a..13f1d876eae 100644 --- a/components/allocator/lib.rs +++ b/components/allocator/lib.rs @@ -13,7 +13,7 @@ pub use crate::platform::*; mod platform { use std::os::raw::c_void; - pub use jemallocator::Jemalloc as Allocator; + pub use tikv_jemallocator::Jemalloc as Allocator; /// Get the size of a heap block. /// @@ -21,12 +21,12 @@ mod platform { /// /// Passing a non-heap allocated pointer to this function results in undefined behavior. pub unsafe extern "C" fn usable_size(ptr: *const c_void) -> usize { - jemallocator::usable_size(ptr) + tikv_jemallocator::usable_size(ptr) } /// Memory allocation APIs compatible with libc pub mod libc_compat { - pub use jemalloc_sys::{free, malloc, realloc}; + pub use tikv_jemalloc_sys::{free, malloc, realloc}; } } diff --git a/components/profile/Cargo.toml b/components/profile/Cargo.toml index e32e195822f..eacd0b55d0e 100644 --- a/components/profile/Cargo.toml +++ b/components/profile/Cargo.toml @@ -26,4 +26,4 @@ regex = { workspace = true } [target.'cfg(not(target_os = "windows"))'.dependencies] libc = { workspace = true } [target.'cfg(not(any(target_os = "windows", target_env = "ohos")))'.dependencies] -jemalloc-sys = { workspace = true } +tikv-jemalloc-sys = { workspace = true } diff --git a/components/profile/mem.rs b/components/profile/mem.rs index bd42e5fa93c..5d791d5e6e2 100644 --- a/components/profile/mem.rs +++ b/components/profile/mem.rs @@ -500,7 +500,7 @@ mod system_reporter { } #[cfg(not(any(target_os = "windows", target_env = "ohos")))] - use jemalloc_sys::mallctl; + use tikv_jemalloc_sys::mallctl; #[cfg(not(any(target_os = "windows", target_env = "ohos")))] fn jemalloc_stat(value_name: &str) -> Option {