[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stack calibration
From: |
Andy Wingo |
Subject: |
stack calibration |
Date: |
Fri, 27 Mar 2009 14:19:28 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
Hey Guilers,
The recent commit to compile with the stack calibration file,
7ca96180f00800414a9cf855e5ca4dceb9baca07, breaks compilation because the
compile scripts have hash-bang lines like this:
#!/bin/sh
# -*- scheme -*-
exec ${GUILE-guile} -e '(@ (scripts compile) compile)' -s $0 "$@"
!#
Also, it is a bit irritating to have to load a file just so Guile won't
be broken (exaggerated wording, but I think that's what it is.)
So I have a proposal. We should set the stack limit to 60k words.
Pros: 1) This way Guile will just work.
2) It's simple.
3) We avoid the evaluator this way.
Cons: 1) A stack-consuming process will take longer to catch.
I cannot think of any other cons. GC just marks between the stack base
and the stack pointer anyway. This would be 500 kB on x86-64, but a
normal program would never use that, and last time I looked processes
had 2 MB of stack by default anyway. It would be 250 kB on Linux.
If we were really concerned about processes actually consuming all of
their stack, we should use a value from getrlimit(2) instead.
I'm going to create a dev/wingo branch now, so I can push things for
review without mucking up master. I'll push patches implementing this to
there.
Cheers,
Andy
--
http://wingolog.org/
- stack calibration,
Andy Wingo <=