-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rust doesn't reliably build on 32-bit operating systems anymore #18784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Regardless of what else we do, reducing memory consumption would also, of course, be a good idea. I ran massif on master (16d80de, to be precise) and the output is here. I haven't had time to look yet. I suspect we can do a lot to reduce the type-checking peak; not sure what's the best way to approach the LLVM side -- perhaps the parallel compilation logic can help here. |
I've had this idea of splitting the type interner/context into a global and a local (per-function) one. However, it's not an easy thing to do - #18483 aka Which is pretty much impossible right now. Certain lifetime elision features need to be implemented in order for further experimentation to be possible, and I can't do much, given school and personal defficiencies. If desired, I can update the code generating those statistics, add indirect memory usage estimates and run it on master, to get us an estimation. |
So I think we have to attack this problem with a variety of approaches. It's blocking lots of important PRs and that has to stop -- at the same time, we should think about longer term fixes as well. From reading the massif output, I see that:
|
I think that using jemalloc in LLVM or splitting up librustc is the best way to go for now. Getting the benefit of extra compilation units may be somewhat difficult. I think we'd have to translate/destroy each one of them in turn instead of what we do now which is to build all compilation units at once and then compile them. I would suspect that there's a large amount of duplicated data between contexts so the trans peak would be higher. But then again of the LLVM peak is higher than the trans peak, maybe it wouldn't be so bad... |
On Wed, Nov 12, 2014 at 09:05:45AM -0800, Alex Crichton wrote:
I've made some progress on splitting up librustc. I've also found that |
#18896 will be the new attempt at using jemalloc in just executables via symbol aliases |
This branch breaks up rustc into two crates. It builds up to rustdoc. The division is not "logical" necessarily, I based it purely on the dependencies in the modules, though it kind of makes sense -- basically it moves the overarching driver plus everything that occurs after trans into another crate. I haven't measured the overall effect on memory usage. |
#19002 implements the proposed crate split. |
I think the crate splits have basically fixed this issue. Closing. Re-open if you disagree. |
fix: Do not merge spans if they have different anchors
Rust often requires more than 2G of virtual memory so it's not possible to build it on a 32-bit OS. This is especially problematic on Windows.
#18678 may be enough to fix this on Linux / FreeBSD, and would allow preventing regressions via the jemalloc
mapped
statistic (+ accounting for the VM used by libraries, etc.).The text was updated successfully, but these errors were encountered: