On Thu, Oct 27, 2011 at 11:39 PM, Will Dietz <span dir="ltr"><<a href="mailto:wdietz2@illinois.edu">wdietz2@illinois.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Oct 27, 2011 at 4:08 PM, Nicolas Geoffray<br>
<<a href="mailto:nicolas.geoffray@gmail.com">nicolas.geoffray@gmail.com</a>> wrote:<br>
><br>
> What do you mean? Java objects are always GC-allocated. VMKit internal<br>
> structures like j3::JavaMethod or j3::JavaField are malloced.<br>
<br>
</div>Okay, it would appear I still don't understand.  I thought you were<br>
saying we didn't GC-allocate instances of "java.lang.Class",<br>
"java.lang.ref.Field", etc </blockquote><div><br></div><div>Of course we do: whatever is used in Java code as a Java object must be GC-allocated. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
(which kinda made sense since they all come<br>
from the JVM and I don't think you can do much with them besides pass<br>
around a pointer/call methods on them).<br></blockquote><div><br></div><div>What do you mean they come from the JVM? They have an internal JVM representation that is not GC-allocated.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
>><br>
>> However the field layout is wrong, and the protection domain is wrong...<br>
>><br>
>> I'll get back to you :).<br>
>><br>
<br>
</div>Patch for this submitted in different thread, should be<br>
straightforward (just mapped over the field layout from javap) but<br>
splitting that from this discussion.<br>
<div class="im"><br>
><br>
> OK. Note that I understand the problem and have a few ideas we could<br>
> discuss. But please do as you think would be best, and we can then talk :)<br>
> Nicolas<br>
><br>
<br>
</div>Well, if you have the time I would very much appreciate any ideas you<br>
have.  As you said you "understand the problem" hehe (and you might<br>
notice I'm still very much learning how this all works!) so I'm more<br>
than happy to, uh, let you take the lead on this :).  Although I do<br>
humbly ask that you explain briefly if you don't mind too terribly :).<br>
<br>
Would something as simple as adding extra fields to JavaObjectClass<br>
work? java.lang.Class *is* final and not cloneable, after all...<br>
<font color="#888888"><br>
~Will<br>
</font></blockquote></div><br>