This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC Patch: garbage free StackTrace methods


Tom Tromey writes:
 > >>>>> "Anthony" == Anthony Green <green@redhat.com> writes:
 > 
 > Anthony> I recently noticed that we allocate new StackTrace objects
 > Anthony> for each class.forName() when we're looking for a class
 > Anthony> loader.  Allocating a StackTrace object involves a couple
 > Anthony> more allocations as well.  But a quick look at the code tells
 > Anthony> us that we can get the same thing done with no allocations.
 > 
 > Good idea.
 > 
 > I think Andrew and Bryce should really comment on this patch.

It looks okay.  

I was thinking of speeding things up by modifying the compiler to
special case Class.forName(), but it seems that there are other areas
that need to find the caller's class loader -- RMI for instance -- so
just fixing Class.forName() doesn't do the whole job.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]