Re: [rvm-research] question regarding raw memory access
Erik Brangs <[email protected]> Tue, 6 Dec 2016 19:53:50 +0100
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 06.12.2016 18:51, Eliot Moss wrote: > I can see two potential problems with that: > > 1) You need to make sure that objectRef is not null. On the Jikes RVM side, it's possible to check if objectRef is actually a valid reference by using validRef(ObjectReference) from DebugUtils from the org.jikesrvm.mminterface package. I'm not sure if there's a MMTk equivalent. If there isn't, you can write your own or add code to call it via the normal MMTk-Jikes RVM interface. > 2) I wonder how you calculate size. I observe that header words, > and as I recall, even the first field, of objects occur at > negative offsets. You may be accessing beyond the end of an > object ... I suppose it would be possible to do the size calculation using methods from ObjectModel. Kind regards, Erik Brangs ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi