This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Signal handling rewrite for Linux / i386
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- To: "'Andrew Haley'" <aph at cambridge dot redhat dot com>, Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Cc: java at gcc dot gnu dot org, "Boehm, Hans" <hans_boehm at hp dot com>
- Date: Thu, 24 Jan 2002 13:58:12 -0800
- Subject: RE: Signal handling rewrite for Linux / i386
Is there any way we can preallocate the stack overflow exception, so that it
doesn't need to be allocated in the signal handler?
There are two problems with allocating it in the signal handler:
1) Either the garbage collector needs to understand sigaltstack, or you need
to use clever hacks in allocating the alternate stack in just the right
place. Otherwise you could just set up SIGSEGV so that the thread stopping
signals are disabled in the handler, and thus the collector should never see
any of this, I think.
2) I suspect the alternate stack needs to be larger than you think, since
the collector may need to run in it. If parallel collection is enabled, it
puts its local mark stack there, among other things.
Re: custom stacks:
The linuxthreads code for pthread_self() on some platforms gets much slower
if you use nondefault stack sizes. Does anyone understand on what platforms
that still matters? I believe it doesn't if you can reserve a register for
the thread pointer.
Hans