FW: RFR (S): memory handling improvements

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Thu Dec 13 01:20:27 PST 2012


Hi,

I don't see either why strdup is needed.

But basically my intent was to share the fix of the memory leak, 
not to improve legacy code.  But if that results in an improvement, 
I'm happy.

Best regards,
  Goetz.

-----Original Message-----
From: David Holmes [mailto:david.holmes at oracle.com] 
Sent: Donnerstag, 13. Dezember 2012 03:48
To: Vitaly Davidovich
Cc: Lindenmaier, Goetz; hotspot-dev at openjdk.java.net
Subject: Re: FW: RFR (S): memory handling improvements

On 13/12/2012 2:39 AM, Vitaly Davidovich wrote:
> Why is the sys_classpath copied in the first place? Is there a chance it's
> modified while this code runs? Otherwise I don't see a reason for it, but I
> probably missed something.

That was my immediate reaction too - why the strdup? :) I don't see a 
reason for it either.

I can't comment on the GC code.

David
------

> Thanks
>
> Sent from my phone
> On Dec 12, 2012 11:30 AM, "Lindenmaier, Goetz"<goetz.lindenmaier at sap.com>
> wrote:
>
> Hi,
>
>
> =>  Sorry, now I fixed the link to the webrev.
>
> I found two fixes for memory handling in our (SAP) hotspot code and want
> to share this with you:
> http://cr.openjdk.java.net/~goetz/webrevs/webrev-mem/
>
> In classLoader.cpp there is a memory leak, easy to be fixed.
>
> In parNewGeneration we allocate the overflow list elements
> on an arena. This is faster to allocate and no free is necessary.  It
> performed
> better with our VM than malloc/free.
>
> I propose to change openJDK accordingly.
>
> Best regards,
>    Goetz Lindenmaier


More information about the hotspot-dev mailing list