parity-util-mem 0.7.0

Collection of memory related utilities
Documentation
[package]
name = "parity-util-mem"
version = "0.7.0"
authors = ["Parity Technologies <admin@parity.io>"]
repository = "https://github.com/paritytech/parity-common"
description = "Collection of memory related utilities"
license = "MIT OR Apache-2.0"
edition = "2018"

# Prevent multiple versions from being linked into the same program.
links = "parity-util-mem-ban-duplicates"
# `links` requires a build script to be present:
# https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key
# so we use an empty build script
build = "build.rs"

[dependencies]
cfg-if = "0.1.10"
dlmalloc = { version = "0.1.3", features = ["global"], optional = true }
wee_alloc = { version = "0.4.5", optional = true }
lru = { version = "0.5", optional = true }
hashbrown = { version = "0.8", optional = true }
mimalloc = { version = "0.1.18", optional = true }
libmimalloc-sys = { version = "0.1.14", optional = true }
parity-util-mem-derive = { path = "derive", version = "0.1" }
impl-trait-for-tuples = "0.1.3"

smallvec = { version = "1.0.0", optional = true }
ethereum-types = { version = "0.9.0", optional = true, path = "../ethereum-types" }
parking_lot = { version = "0.10.0", optional = true }
primitive-types = { version = "0.7", path = "../primitive-types", default-features = false, optional = true }

[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3.8", features = ["heapapi"] }

[target.'cfg(not(target_os = "windows"))'.dependencies.jemallocator]
version = "0.3.2"
optional = true

[features]
default = ["std", "ethereum-impls", "lru", "hashbrown", "smallvec", "primitive-types"]
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 = ["jemallocator"]
# use mimalloc as global allocator
mimalloc-global = ["mimalloc", "libmimalloc-sys"]
# implement additional types
ethereum-impls = ["ethereum-types", "primitive-types"]
# Full estimate: no call to allocator
estimate-heapsize = []