Switch allocator to jemalloc (#3697)

## Proposed Changes

Another `tree-states` motivated PR, this adds `jemalloc` as the default allocator, with an option to use the system allocator by compiling with `FEATURES="" make`.

- [x] Metrics
- [x] Test on Windows
- [x] Test on macOS
- [x] Test with `musl`
- [x] Metrics dashboard on `lighthouse-metrics` (https://github.com/sigp/lighthouse-metrics/pull/37)


Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
Michael Sproul
2023-01-20 04:19:29 +00:00
parent f8a3b3b95a
commit 4deab888c9
13 changed files with 175 additions and 32 deletions

View File

@@ -8,6 +8,7 @@ edition = "2021"
[features]
portable = ["bls/supranational-portable"]
fake_crypto = ['bls/fake_crypto']
jemalloc = ["malloc_utils/jemalloc"]
[dependencies]
bls = { path = "../crypto/bls" }
@@ -40,3 +41,7 @@ eth2 = { path = "../common/eth2" }
snap = "1.0.1"
beacon_chain = { path = "../beacon_node/beacon_chain" }
store = { path = "../beacon_node/store" }
malloc_utils = { path = "../common/malloc_utils" }
[package.metadata.cargo-udeps.ignore]
normal = ["malloc_utils"]