Cargo bench eats excessive memory on WSL2 ubuntu #79857
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
C-bug
Category: This is a bug.
I-compilemem
Issue: Problems and improvements with respect to memory usage during compilation.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This issue supersedes rust-lang/cargo#8961
TL;DR
This can be worked around by setting
CARGO_BUILD_JOBS
.Description
Briefly,
cargo bench
eats excessive memory on WSL2 with a 10-core 20-thread i9-10900K Intel CPU and 32GB memory, due to:rustc
processes and each process would take more than 2GB memory.rustc
s get killed.Other information
cargo build
orcargo test
, with or without--release
.Steps
git clone https://github.com/ecies/rs.git eciesrs && cd eciesrs
in WSL2 ubuntu shell.cargo bench --no-default-features --features pure
Possible Solution(s)
Set
CARGO_BUILD_JOBS
to a lower value.Notes
Output of
cargo version
:Possibly related issues
The text was updated successfully, but these errors were encountered: