aboutsummaryrefslogtreecommitdiffstats
path: root/components/allocator/lib.rs
diff options
context:
space:
mode:
authorMukilan Thiyagarajan <mukilan@igalia.com>2024-07-22 13:25:46 +0530
committerGitHub <noreply@github.com>2024-07-22 07:55:46 +0000
commita007baa4cf6791cb42e2d7ec46eb9cc803f24b29 (patch)
tree58e57ba8fc56a95791f25bc5774ff64a870bef19 /components/allocator/lib.rs
parentf6dc35f11dcbc7f3cfeb7f0e804c5f9851088ebe (diff)
downloadservo-a007baa4cf6791cb42e2d7ec46eb9cc803f24b29.tar.gz
servo-a007baa4cf6791cb42e2d7ec46eb9cc803f24b29.zip
deps: switch to `tikv-jemallocator` crates in Cargo.toml (#32828)
`jemallocator` and `jemallocator-sys` crates are same as the `tikv-*` versions and these aliases were maintained for historical reasons, based on crates.io documentation. For newer projects, it is recommended to use the `tikv-` versions of the crate. Even though Servo is not a new project, it makes sense to switch to the newer version for the sake of clarity. Also, more importantly, `tikv-jemallocator` has new release (0.6.0) which includes a fix for #32720. There doesn't seem to be a corresponding version publised for the `jemallocator` crate. Fixes #32720 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'components/allocator/lib.rs')
-rw-r--r--components/allocator/lib.rs6
1 files changed, 3 insertions, 3 deletions
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};
}
}