On 7/10/14 9:46 PM, Nicholas Nethercote wrote:
Does Rust have any stack-measuring capabilities?
It doesn't; let's definitely file a Rust issue on that.
The reason why Rust stacks don't go through jemalloc and instead mmap
directly is because of the desire to place guard pages, I believe.
Historically, Rust's large stacks were due to the fact that at the time
stack growth was removed, rustc had worse codegen than it did today,
resulting in frames with very large activation records. Coupled with the
fact that rustc itself uses recursion heavily (probably too heavily),
the easiest thing to do was to give tasks large stacks by default.
Perhaps this decision should be revisited, as I think that it may well
be the case that rustc is going to be the exception, not the rule.
You can tune the size of stack growth when spawning a Rust task. Servo
could definitely use a stack size audit; I bet a ton of MBs can be
shaved off with some tuning.
Patrick
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo