|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.vm.ObjectModel
public abstract class ObjectModel
Constructor Summary | |
---|---|
ObjectModel()
|
Method Summary | |
---|---|
(package private) static Offset |
arrayBaseOffsetTrapdoor(ObjectModel o)
|
abstract boolean |
attemptAvailableBits(ObjectReference object,
Word oldVal,
Word newVal)
Attempts to set the bits available for memory manager use in an object. |
abstract ObjectReference |
copy(ObjectReference from,
int allocator)
Copy an object using a plan's allocCopy to get space and install the forwarding pointer. |
abstract Address |
copyTo(ObjectReference from,
ObjectReference to,
Address region)
Copy an object to be pointer to by the to address. |
abstract void |
dumpObject(ObjectReference object)
Dump debugging information for an object. |
abstract Offset |
GC_HEADER_OFFSET()
Gets the offset of the memory management header from the object reference address. |
abstract int |
getAlignOffsetWhenCopied(ObjectReference object)
Return the alignment offset requirements for a copy of this object |
abstract int |
getAlignWhenCopied(ObjectReference object)
Return the alignment requirement for a copy of this object |
protected abstract Offset |
getArrayBaseOffset()
|
abstract int |
getArrayLength(ObjectReference object)
Get the length of an array object. |
abstract int |
getCurrentSize(ObjectReference object)
Return the size used by an object |
abstract ObjectReference |
getNextObject(ObjectReference object)
Return the next object in the heap under contiguous allocation |
abstract Address |
getObjectEndAddress(ObjectReference object)
Gets a pointer to the address just past the end of the object. |
abstract ObjectReference |
getObjectFromStartAddress(Address start)
Return an object reference from knowledge of the low order word |
abstract ObjectReference |
getReferenceWhenCopiedTo(ObjectReference from,
Address to)
Return the reference that an object will be referred to after it is copied to the specified region. |
abstract int |
getSizeWhenCopied(ObjectReference object)
Return the size required to copy an object |
abstract byte[] |
getTypeDescriptor(ObjectReference ref)
Get the type descriptor for an object. |
abstract boolean |
isAcyclic(ObjectReference typeRef)
Checks if a reference of the given type in another object is inherently acyclic. |
abstract boolean |
isArray(ObjectReference object)
Is the passed object an array? |
abstract boolean |
isPrimitiveArray(ObjectReference object)
Is the passed object a primitive array? |
abstract Address |
objectStartRef(ObjectReference object)
Returns the lowest address of the storage associated with an object. |
abstract Word |
prepareAvailableBits(ObjectReference object)
Gets the value of bits available for memory manager use in an object, in preparation for setting those bits. |
abstract Word |
readAvailableBitsWord(ObjectReference object)
Read the bits available for memory manager use in an object. |
abstract byte |
readAvailableByte(ObjectReference object)
Read the byte available for memory manager use in an object. |
abstract Address |
refToAddress(ObjectReference object)
Returns an address guaranteed to be inside the storage assocatied with and object. |
abstract void |
writeAvailableBitsWord(ObjectReference object,
Word val)
Sets the bits available for memory manager use in an object. |
abstract void |
writeAvailableByte(ObjectReference object,
byte val)
Sets the byte available for memory manager use in an object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectModel()
Method Detail |
---|
public abstract ObjectReference copy(ObjectReference from, int allocator)
from
must have
been reserved for copying by the caller. This method calls the
plan's getStatusForCopy()
method to establish a new
status word for the copied object and postCopy()
to
allow the plan to perform any post copy actions.
from
- the address of the object to be copiedallocator
- The allocator to use.
public abstract Address copyTo(ObjectReference from, ObjectReference to, Address region)
from
- the address of the object to be copiedto
- The target location.region
- The start of the region that was reserved for this object
public abstract ObjectReference getReferenceWhenCopiedTo(ObjectReference from, Address to)
from
- The object to be copied.to
- The region to be copied to.
public abstract int getSizeWhenCopied(ObjectReference object)
object
- The object whose size is to be queried
obj
public abstract int getAlignWhenCopied(ObjectReference object)
object
- The object whose size is to be queried
obj
public abstract int getAlignOffsetWhenCopied(ObjectReference object)
object
- The object whose size is to be queried
obj
public abstract int getCurrentSize(ObjectReference object)
object
- The object whose size is to be queried
obj
public abstract ObjectReference getNextObject(ObjectReference object)
public abstract ObjectReference getObjectFromStartAddress(Address start)
public abstract Address getObjectEndAddress(ObjectReference object)
object
- The objecty.public abstract byte[] getTypeDescriptor(ObjectReference ref)
ref
- address of the object
public abstract boolean isArray(ObjectReference object)
object
- address of the objectpublic abstract boolean isPrimitiveArray(ObjectReference object)
object
- address of the objectpublic abstract int getArrayLength(ObjectReference object)
object
- address of the object
public abstract boolean attemptAvailableBits(ObjectReference object, Word oldVal, Word newVal)
oldVal
. The comparison with the
current value and setting are atomic with respect to other
allocators.
object
- the address of the objectoldVal
- the required current value of the bitsnewVal
- the desired new value of the bits
true
if the bits were set,
false
otherwisepublic abstract Word prepareAvailableBits(ObjectReference object)
object
- the address of the object
public abstract void writeAvailableByte(ObjectReference object, byte val)
object
- the address of the objectval
- the new value of the bytepublic abstract byte readAvailableByte(ObjectReference object)
object
- the address of the object
public abstract void writeAvailableBitsWord(ObjectReference object, Word val)
object
- the address of the objectval
- the new value of the bitspublic abstract Word readAvailableBitsWord(ObjectReference object)
object
- the address of the object
public abstract Offset GC_HEADER_OFFSET()
public abstract Address objectStartRef(ObjectReference object)
object
- the reference address of the object
public abstract Address refToAddress(ObjectReference object)
object
- the reference address of the object
public abstract boolean isAcyclic(ObjectReference typeRef)
true
if a reference of the type is
inherently acyclicpublic abstract void dumpObject(ObjectReference object)
object
- The object whose information is to be dumpedprotected abstract Offset getArrayBaseOffset()
static Offset arrayBaseOffsetTrapdoor(ObjectModel o)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |