<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Stefan,<br>
<br>
On 01/20/2012 11:21 AM, Stefan Karlsson wrote:<br>
<blockquote
cite="mid:8C7CE33B-1215-4828-836B-EC0860F5D5CF@oracle.com"
type="cite">
<pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;"><span class="changed">1067 Handle h((oop)result);</span> </span></font></pre>
<pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">1068 collect(GCCause::_g1_humongous_allocation); </span></font></pre>
<pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">1069 } </span></font></pre>
<pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">1070 return result; </span></font></pre>
<pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">1071 }</span></font></pre>
<pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">Can we really have a handle to uninitialized memory?</span></font></pre>
</blockquote>
<br>
Yes. The "unitialized" memory is made to look like a scalar array
(of the correct size) before creating the handle. So, I can't see
any issues.<br>
<br>
<blockquote
cite="mid:8C7CE33B-1215-4828-836B-EC0860F5D5CF@oracle.com"
type="cite">
<pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">Are you sure that the humongous object will not be moved by a full collection. </span></font></pre>
</blockquote>
<br>
Yes, humongous objects never move during evacuation pauses.<br>
<br>
<blockquote
cite="mid:8C7CE33B-1215-4828-836B-EC0860F5D5CF@oracle.com"
type="cite">
<pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">You should probably return h() instead of result.</span></font></pre>
</blockquote>
<br>
Maybe we could add an assert that h() == result?<br>
<br>
Tony<br>
<br>
<blockquote
cite="mid:8C7CE33B-1215-4828-836B-EC0860F5D5CF@oracle.com"
type="cite">
<pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">StefanK</span></font></pre>
<br>
<blockquote type="cite">
<div><span></span><br>
<span>Bengt</span><br>
</div>
</blockquote>
</blockquote>
</body>
</html>