[rvm-research] question regarding raw memory access
Shoaib Akram <[email protected]> Tue, 6 Dec 2016 17:12:14 +0100
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi All, I am trying to access the bytes that make up an object using the utility function Magic.getByteAtOffset(Object, Offset). I am doing this during a GC pause after all edges in an object are processed in scanObject(ObjectReference). This procedure is useful, for instance, in creating a unique hash for each object. Given that idx is of type int ranging from 0 to sizeof_object_minus_one, offset is initialized to zero, and objectRef is of type ObjectReference, I use the following statement to access the bytes stored in each object in memory. byte next_byte = Magic.getByteAtOffset(objectRef.toObject(), offset.plus(idx)); This statement results in a hardware trap (after a few GC pauses). Is this the correct and safe approach to access raw memory in this part of JikesRVM (SpecializedScanMethod::scanObject(ObjectReference))? Regards, Shoaib. ------------------------------------------------------------------------------ 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