GC statistics (was Re: big project ported)
Anthony Green
green@cygnus.com
Wed Oct 27 22:01:00 GMT 1999
Tom wrote:
> This is a shot in the dark but would it be possible to reduce the work
> the garbage collector has to do by allocating temporary objects that
> live within the scope of a method call on the stack? It'd be
> interesting to see some statistics on what percentage of objects
> created in a typical Java program are temporary objects. I'd suspect
> its pretty high.
This paper talks about stack allocation of Java objects:
http://www.cse.ucsc.edu/research/embedded/pubs/gc/index.html
Their finding:
The percentage of objects that could have been allocated on a stack
instead of on the heap ranged from zero to possibly as high as 56%,
but were generally in the 5-15% range.
AG
--
Anthony Green Cygnus Solutions
Sunnyvale, California
More information about the Java
mailing list