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

Paolo Molaro lupus at ximian.com
Mon Oct 6 10:18:54 EDT 2003

On 10/06/03 Dick Porter wrote:
> On Sat, 2003-10-04 at 11:32, Varga Zoltan wrote:
> >    I would recommend adding a function to io-layer to set
> > the default
> > stack size. The JIT and the interpreter could call it with
> > different values on startup.
> We can't add any external API to io-layer that isn't in the w32 API.

There is no need for an additional API entry point: CreateThread already
has an argument to specify the stack size for the thread, so io-layer
just needs to be fixed to obey that argument and the entry point could
be added to metadata/.

> For the stack size, CreateThread sets it because of issues with BSD.  It
> would probably be best to just conditionally define that and let other
> platforms use their defaults.

As for the original issue: it makes sense to double the default stack
size for 64 bit apps, but I'm not sure increasing the stack size for mint is
a correct solution: if it requires 30+MB of stack, there is something 
else to fix. I would support using an environment variable to set the
stack size to non-default values, so that specific apps that may have
particular demands can be tweaked, both increasing the stack size (mint
until it's fixed) and decreasing it (think an app server with thousand
of threads on a 32bit system).


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list