From 4d799dc082ba0a54bb305dc218947e5828ec3143 Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 19 Sep 2022 18:06:19 +0200 Subject: [PATCH] parity-util-mem: remove wee_alloc (#678) --- parity-util-mem/Cargo.toml | 3 --- parity-util-mem/src/allocators.rs | 5 ----- parity-util-mem/src/lib.rs | 7 ------- 3 files changed, 15 deletions(-) diff --git a/parity-util-mem/Cargo.toml b/parity-util-mem/Cargo.toml index c378d11e6..ae772e519 100644 --- a/parity-util-mem/Cargo.toml +++ b/parity-util-mem/Cargo.toml @@ -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 } @@ -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 diff --git a/parity-util-mem/src/allocators.rs b/parity-util-mem/src/allocators.rs index 2c63d55d4..576e93314 100644 --- a/parity-util-mem/src/allocators.rs +++ b/parity-util-mem/src/allocators.rs @@ -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) @@ -50,7 +46,6 @@ mod usable_size { if #[cfg(any( target_arch = "wasm32", feature = "estimate-heapsize", - feature = "weealloc-global", feature = "dlmalloc-global", ))] { diff --git a/parity-util-mem/src/lib.rs b/parity-util-mem/src/lib.rs index 68771a2e0..4531c63f9 100644 --- a/parity-util-mem/src/lib.rs +++ b/parity-util-mem/src/lib.rs @@ -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(