RFR: 8010992: Remove calls to global ::operator new[] and new

Ioi Lam ioi.lam at oracle.com
Mon Apr 15 18:46:12 UTC 2013


On 04/14/2013 11:07 PM, David Holmes wrote:
> Hi Yumin,
>
> On 13/04/2013 7:07 AM, Yumin Qi wrote:
>> After take feedback and modify, new webrev
>>
>> http://cr.openjdk.java.net/~minqi/8010992/webrev1
>> <http://cr.openjdk.java.net/%7Eminqi/8010992/webrev1>
>
> I still find the HandleMark changes unsatisfactory. The CHeap 
> allocated HandleMark in the Thread() constructor is a bit of a hack. 
> HandleMarks should be stack-allocated. Plus we seem to leak that CHeap 
> allocated HandleMark as we don't keep any pointer to it! I think this 
> needs to be re-visited, but as a separate CR.
>
David,

The HandleMark is not leaked. It is freed in the Thread destructor:

before:

    355   delete last_handle_mark();

after:

    355   FREE_C_HEAP_ARRAY(HandleMark, last_handle_mark(), mtInternal);

- Ioi



More information about the hotspot-gc-dev mailing list