|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.ObjectMemory
public final class ObjectMemory
An ObjectMemory instance is an immutable wrapper for an object memory and its metadata.
Field Summary | |
---|---|
static String |
BOOTSTRAP_URI
The reserved URI denoting the bootstrap suite. |
static String |
BOOTSTRAP_URI_PROPERTY
The property name used to specify a different default than squawk.suite for the bootstrap suite. |
Constructor Summary | |
---|---|
ObjectMemory(Address start,
int size,
String uri,
Object root,
int hash,
ObjectMemory parent)
Constructs a new object memory file. |
Method Summary | |
---|---|
boolean |
containsAddress(Address address)
Determines if this object memory contains a given address. |
boolean |
containsCanonicalAddress(Address canonicalAddress)
Determines if this object memory contains a given canonical address. |
static ObjectMemory |
createBootstrapObjectMemory(Suite bootstrapSuite)
Creates an ObjectMemory that is a wrapper for the bootstrap suite. |
ObjectMemory |
findAddress(Address address)
Searches up a chain of object memories starting from this one for a given physical address. |
ObjectMemory |
findCanonicalAddress(Address canonicalAddress)
Searches up a chain of object memories starting from this one for a given canonical address. |
Address |
fromCanonical(Address canonicalAddress)
Converts a canonical address that is within the range of this object memory into a physical address. |
Address |
getCanonicalEnd()
Gets the address one byte past the end of the canonical object memory. |
Address |
getCanonicalStart()
Gets the canonical starting address of this object memory. |
Address |
getEnd()
Gets the address one byte past the end of the object memory. |
int |
getHash()
Gets the hash of the canonical form of this object memory. |
ObjectMemory |
getParent()
Gets the direct parent object memory of this object memory. |
int |
getParentCount()
Gets the number of parents in the chain of parent object memories. |
Object |
getRoot()
Gets the root object in this object memory. |
int |
getSize()
Gets the size (in bytes) of the object memory. |
Address |
getStart()
Gets the start address of the object memory. |
String |
getURI()
Gets the URI identifiying this object memory. |
static void |
relocate(String uri,
Object sourceStartBuffer,
Address sourceStart,
BitSet oopMap,
Address targetStart,
Address targetCanonicalStart,
int targetSize,
boolean toCanonical,
boolean requiresEndianSwap,
boolean trace,
boolean verifyClearOopMap)
Relocates the pointers in a range of memory that point to some target range of memory. |
static void |
relocateParents(String uri,
Object startBuffer,
Address start,
BitSet oopMap,
ObjectMemory parent,
boolean toCanonical,
boolean requiresEndianSwap,
boolean trace)
Relocate all the pointers in a range of memory that point to one or more parent object memories. |
Address |
toCanonical(Address address)
Converts a physical address that is within the range of this object memory into a canonical address. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String BOOTSTRAP_URI
public static final String BOOTSTRAP_URI_PROPERTY
Constructor Detail |
---|
public ObjectMemory(Address start, int size, String uri, Object root, int hash, ObjectMemory parent)
start
- the start address of the object memory.size
- the size (in bytes) of the object memoryuri
- the URI identifying this object memoryroot
- the root of the serialized graph in the object memoryhash
- the hash object memory in canonical formparent
- the direct parent object memoryMethod Detail |
---|
public static ObjectMemory createBootstrapObjectMemory(Suite bootstrapSuite)
bootstrapSuite
-
public Address getCanonicalStart()
public Address getCanonicalEnd()
public int getSize()
public Object getRoot()
public ObjectMemory getParent()
public int getParentCount()
public int getHash()
public String getURI()
public Address getStart()
public Address getEnd()
public boolean containsAddress(Address address)
address
- the address to test
address
public boolean containsCanonicalAddress(Address canonicalAddress)
canonicalAddress
- the address to test
canonicalAddress
public ObjectMemory findAddress(Address address)
address
- the address to search for
address
liespublic ObjectMemory findCanonicalAddress(Address canonicalAddress)
canonicalAddress
- the canonical address to search for
canonicalAddress
liespublic Address toCanonical(Address address)
address
- the physical address to convert
address
public Address fromCanonical(Address canonicalAddress)
canonicalAddress
- the canonical address to convert
canonicalAddress
public static void relocateParents(String uri, Object startBuffer, Address start, BitSet oopMap, ObjectMemory parent, boolean toCanonical, boolean requiresEndianSwap, boolean trace)
uri
- the URI of the source memory whose pointers are being relocatedstartBuffer
- the object containing the source memory if it is in a RAM buffer otherwise nullstart
- the start address of the source memoryoopMap
- describes where all the not yet relocated pointers in the source memory are. The bits are
are cleared as the corresponding pointers are relocated.parent
- the direct parent memory of the given memorytoCanonical
- specifies the direction of the relocationrequiresEndianSwap
- specifies if the endianess of the pointers differs from the endianess of the platformtrace
- enables tracing if truepublic static void relocate(String uri, Object sourceStartBuffer, Address sourceStart, BitSet oopMap, Address targetStart, Address targetCanonicalStart, int targetSize, boolean toCanonical, boolean requiresEndianSwap, boolean trace, boolean verifyClearOopMap) throws com.sun.squawk.ObjectMemory.GCDuringRelocationError
toCanonical
is true, then the pointers are currently relative to the
real address of the target memory and are adjusted to be relative to its canonical address.
Otherwise, the pointers are currently relative to the canonical address of the target memory
and are adjusted to be relative to its real address.
uri
- the URI of the source memory whose pointers are being relocatedsourceStartBuffer
- the object containing the source memory if it is in a RAM buffer otherwise nullsourceStart
- the start address of the source memoryoopMap
- describes where all the not yet relocated pointers in the source memory are. The bits are
are cleared as the corresponding pointers are relocated.targetStart
- the real start address of the target spacetargetCanonicalStart
- the canonical start address of the target spacetargetSize
- the size of the target spacetoCanonical
- specifies the direction of the relocationrequiresEndianSwap
- specifies if the endianess of the pointers differs from the endianess of the platformtrace
- enables tracing if trueverifyClearOopMap
- if true, this routine will verify that the oop map is empty before returning
GCDuringRelocationError
- if 'sourceStartBuffer' is not null and some point has a different value than
'sourceStart' which implies that a garbage collection occurred
com.sun.squawk.ObjectMemory.GCDuringRelocationError
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |