[Mono-devel-list] Thread stacks sizes - interpreter vs JIT

Bernie Solomon bernard at ugsolutions.com
Fri Oct 3 19:38:30 EDT 2003

I am getting ready to actually put in some of my HPPA 64 bit support and in
looking at my changes have a question on how to handle thread stack sizes.
Currently it is set to 2Mb on all platforms. For 64 bits this could be made
4Mb say. However when running the interpreter (partcularly on HP which seems
to generate large stack frames) this is not enough to, say, run some of the
nunit tests. I've found 32Mb works (not a finely tuned number...) but don't
want to blindly set stack size to this even just for 64bit machines. One
possibility is to somehow detect whether we are running under the
interpreter or JIT and if under the interpreter just scale the JIT number up
by some factor. Another is to have a bunch of platform specific stack sizes
but even then they probably should be different for interpreter vs JIT.

One problem is that I can't see an obvious way for the CreateThread
emulation to know whether it is running under the interpreter or not and the
stack size is currently set here. Perhaps it should actually make use of the
stack size argument and be set at a higher level and fed down from mini/mint

Anyway I was wondering what other people's thoughts were on how to handle
this - and I can have a go at implementing it.

Bernie Solomon

More information about the Mono-devel-list mailing list