Use Jemalloc (#347)

This commit is contained in:
Jakub Nabaglo 2021-11-09 15:14:41 -08:00 committed by GitHub
parent 168f572804
commit 9711127599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -27,6 +27,9 @@ serde = { version = "1.0", features = ["derive"] }
serde_cbor = "0.11.1"
static_assertions = "1.1.0"
[target.'cfg(not(target_env = "msvc"))'.dependencies]
jemallocator = "0.3.2"
[dev-dependencies]
criterion = "0.3.5"
tynm = "0.1.6"

View File

@ -13,3 +13,11 @@ pub mod iop;
pub mod plonk;
pub mod polynomial;
pub mod util;
// Set up Jemalloc
#[cfg(not(target_env = "msvc"))]
use jemallocator::Jemalloc;
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;