Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parity-util-mem: remove wee_alloc #678

Merged
merged 1 commit into from Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions parity-util-mem/Cargo.toml
Expand Up @@ -18,7 +18,6 @@ build = "build.rs"
[dependencies]
cfg-if = "1.0.0"
dlmalloc = { version = "0.2.1", features = ["global"], optional = true }
wee_alloc = { version = "0.4.5", optional = true }
lru = { version = "0.7", optional = true }
hashbrown = { version = "0.12", optional = true }
mimalloc = { version = "0.1.18", optional = true }
Expand Down Expand Up @@ -47,8 +46,6 @@ default = ["std", "ethereum-impls", "lru", "hashbrown", "smallvec", "primitive-t
std = ["parking_lot"]
# use dlmalloc as global allocator
dlmalloc-global = ["dlmalloc", "estimate-heapsize"]
# use wee_alloc as global allocator
weealloc-global = ["wee_alloc", "estimate-heapsize"]
# use jemalloc as global allocator
jemalloc-global = ["tikv-jemallocator", "tikv-jemalloc-ctl"]
# use mimalloc as global allocator
Expand Down
5 changes: 0 additions & 5 deletions parity-util-mem/src/allocators.rs
Expand Up @@ -10,25 +10,21 @@
//! Features are:
//! - windows:
//! - no features: default implementation from servo `heapsize` crate
//! - weealloc: default to `estimate_size`
//! - dlmalloc: default to `estimate_size`
//! - jemalloc: default windows allocator is used instead
//! - mimalloc: use mimallocator crate
//! - arch x86:
//! - no features: use default alloc
//! - jemalloc: use tikv-jemallocator crate
//! - weealloc: default to `estimate_size`
//! - dlmalloc: default to `estimate_size`
//! - mimalloc: use mimallocator crate
//! - arch x86/macos:
//! - no features: use default alloc, requires using `estimate_size`
//! - jemalloc: use tikv-jemallocator crate
//! - weealloc: default to `estimate_size`
//! - dlmalloc: default to `estimate_size`
//! - mimalloc: use mimallocator crate
//! - arch wasm32:
//! - no features: default to `estimate_size`
//! - weealloc: default to `estimate_size`
//! - dlmalloc: default to `estimate_size`
//! - jemalloc: compile error
//! - mimalloc: compile error (until https://github.com/microsoft/mimalloc/pull/32 is merged)
Expand All @@ -50,7 +46,6 @@ mod usable_size {
if #[cfg(any(
target_arch = "wasm32",
feature = "estimate-heapsize",
feature = "weealloc-global",
feature = "dlmalloc-global",
))] {

Expand Down
7 changes: 0 additions & 7 deletions parity-util-mem/src/lib.rs
Expand Up @@ -32,13 +32,6 @@ cfg_if::cfg_if! {
#[global_allocator]
pub static ALLOC: dlmalloc::GlobalDlmalloc = dlmalloc::GlobalDlmalloc;

mod memory_stats_noop;
use memory_stats_noop as memory_stats;
} else if #[cfg(feature = "weealloc-global")] {
/// Global allocator
#[global_allocator]
pub static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

mod memory_stats_noop;
use memory_stats_noop as memory_stats;
} else if #[cfg(all(
Expand Down