Re: FW: How to benchmark memory managers?

"Boehm, Hans" <[email protected]> Mon, 17 Jan 2005 15:36:15 -0800
Newsgroups gmane.comp.programming.garbage-collection.general
Message-ID <65953E8166311641A685BDF71D865826058C2C@cacexc12.americas.cpqcorp.net>
Aren't we mixing separable issues here?

Some garbage-collected environments (e.g. C# structs, IIRC)
support stack-allocated composite data.  Certainly C/C++
with a garbage collector also does.  As Dave points out,
others do not, but the compiler can introduce these as an optimization.

Conversely, one could conceive of a language that did not support
stack-allocated composite data, but required explicit memory
management, though that might be a bit painful to use.

I'm not convinced that the possibility of stack allocation is
tied to the presence of GC.

Hans

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]]On
> Behalf Of David Detlefs - Sun Microsystems Labs BOS
> Sent: Wednesday, January 12, 2005 11:00 AM
> To: [email protected]
> Cc: Calum Grant
> Subject: Re: FW: [gclist] How to benchmark memory managers?
> 
> 
> Calum writes:
> 
> > Another point, which I don't know if it is addressed in the 
> > measurements.  What about objects allocated on the stack?  
> Okay, many 
> > applications don't allocate significant proportions of 
> objects on the 
> > stack, but for those that do, there is a significant 
> performance boost.
> > 
> > So really one wishes to compare GC vs malloc+stack.  One 
> cannot simply 
> > pretend that an application using malloc/new does not use the stack.
> 
> True, but one should also note that escape analysis, say used in a JIT
> compiler, can often prove that a sufficiently simple use of a
> heap-allocated object (say one that is a straightforward translation
> of the use of a stack-allocated structure in C++) is in fact
> stack-allocatable.
> 
> -- 
> ============================================= AntiSpamString: 
> nix flubber now
> ==============================================================
> ===============
> Dave Detlefs                           
> http://www.sunlabs.com/people/detlefs/
> Sun Microsystems Laboratories                           
> [email protected]
> 1 Network Drive, Burlington, MA 01803-0902                    
>  (781)-442-0841
> 
>