mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Fix malloc_utils features (sysmalloc) (#7770)
Follow-up to: - https://github.com/sigp/lighthouse/pull/7764 The `heaptrack` feature added in my previous PR was ineffective, because the jemalloc feature was turned on by the Linux target-specific dependency. This PR tweaks the features such that: - The jemalloc feature is just used to control whether jemalloc is compiled in. It is enabled on Linux by the target-specific dependency (see `lighthouse/Cargo.toml`), and completely disabled on Windows. - If the `sysmalloc` feature is set on Linux then it overrides jemalloc when selecting an allocator, _even if_ the jemalloc feature is enabled (and the jemalloc dep was compiled).
This commit is contained in:
@@ -166,8 +166,8 @@ Commonly used features include:
|
||||
- `slasher-lmdb`: support for the LMDB slasher backend. Enabled by default.
|
||||
- `slasher-mdbx`: support for the MDBX slasher backend.
|
||||
- `beacon-node-leveldb`: support for the leveldb backend. Enabled by default.
|
||||
- `jemalloc`: use [`jemalloc`][jemalloc] to allocate memory. Enabled by default on Linux and macOS.
|
||||
Not supported on Windows.
|
||||
- `sysmalloc`: use the system memory allocator rather than jemalloc. This is always enabled on
|
||||
Windows.
|
||||
- `spec-minimal`: support for the minimal preset (useful for testing).
|
||||
|
||||
Default features (e.g. `slasher-lmdb`, `beacon-node-leveldb`) may be opted out of using the `--no-default-features`
|
||||
@@ -178,8 +178,6 @@ E.g.
|
||||
CARGO_INSTALL_EXTRA_FLAGS="--no-default-features" make
|
||||
```
|
||||
|
||||
[jemalloc]: https://jemalloc.net/
|
||||
|
||||
## Compilation Profiles
|
||||
|
||||
You can customise the compiler settings used to compile Lighthouse via
|
||||
|
||||
Reference in New Issue
Block a user