tetsy-util-mem 0.3.0

Collection of tetsy memory related utilities
[package]
name = "tetsy-util-mem"
version = "0.3.0"
authors = ["Parity Technologies <admin@parity.io>"]
repository = "https://github.com/tetcoin/tetsy-common"
description = "Collection of tetsy memory related utilities"
license = "GPL-3.0"
edition = "2018"

[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.4", optional = true }
hashbrown = { version = "0.6", optional = true }
# from https://github.com/microsoft/mimalloc:
# mimalloc can be built in secure mode,
# adding guard pages, randomized allocation, encrypted free lists, etc.
# to protect against various heap vulnerabilities.
# The performance penalty is only around 3% on average over our benchmarks.
mimallocator = { version = "0.1.3", features = ["secure"], optional = true }
mimalloc-sys = { version = "0.1.6", optional = true }
tetsy-util-mem-derive = { path = "derive", version = "0.1" }
impl-trait-for-tuples = "0.1.3"

smallvec = { version = "1.0.0", optional = true }
# use published version of vapory-types as this commit is focused exclusively on tetsy-util-mem version 0.3.0
vapory-types = { version = "0.8.0", optional = true }
parking_lot = { version = "0.9.0", 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", "vapory-impls", "lru", "hashbrown"]
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 = ["mimallocator", "mimalloc-sys"]
# implement additional types
vapory-impls = ["vapory-types", "smallvec"]
# Full estimate: no call to allocator
estimate-heapsize = []