Jon Masamitsu Jon.Masamitsu at Sun.COM
Wed Jul 11 19:07:47 UTC 2007

Peter B. Kessler wrote:

> ...

> Don't forget to leave some address space for thread stacks,
> other libraries, malloc space, etc.  A simple backoff policy
> from trying to reserve all of memory might be too simplistic.
> I don't know how to estimate beforehand how many thread stacks
> an app will need. :-)
Yes, it would be very annoying not to be able to start all the
threads you needed.   There's no feedback from a failed
thread start to the GC so that we would know we
should  shrink the reserved size of the heap and try the
thread creation again.  Short of building some feedback
mechanism we'd have to do something static like leaving
a fixed amount of space for everything else.   Perhaps this
is not much of an improvement.

More information about the hotspot-gc-dev mailing list