On Thu, Jul 10, 2014 at 10:34 PM, Patrick Walton <pcwal...@mozilla.com> wrote: > > 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.
"Large default stack size" doesn't seem to explain it. I'd guess that the default is 2 MiB, because there are quite a few entries in smaps like this: 7f54091fe000-7f54093fe000 rw-p 00000000 00:00 0 [stack:28143] Size: 2048 kB Rss: 12 kB Pss: 12 kB 2 MiB has been allocated, but only a tiny amount has been touched and is thus in RSS. Here are the two biggest stacks: 7f540a700000-7f540b800000 rw-p 00000000 00:00 0 [stack:28139] Size: 17408 kB Rss: 7944 kB Pss: 7944 kB 7f5409600000-7f540a400000 rw-p 00000000 00:00 0 [stack:28141] Size: 14336 kB Rss: 8192 kB Pss: 8192 kB For both, |Rss| is big and |Size| (equivalent to vsize) is even bigger. Nick _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo