|
|
|
|
|
by e12e
2903 days ago
|
|
> Rustc memory usage on Linux is also high, but it never runs out of memory. I would like to figure out the cause of this issue. Strange. I hope this isn't simply a case of wildly over-committing memory and getting away with it on Linux. But then I guess the bsd folks would have is yes too? |
|
In order to parallelize the build process at the rustc-llvm codegen boundary, Cargo has to implement some orchestration between compiler processes (using jobserver-rs [1]) so that 10 rustc processes didn't all create 10 threads and codegen units each and blow up the system. I'm guessing that memory quotas are a part of that implementation.
[1] https://crates.io/crates/jobserver/reverse_dependencies