org.jikesrvm.objectmodel
Interface BootImageInterface


public interface BootImageInterface

Interface of BootImage that is used to define object model classes.


Method Summary
 Address allocateCodeStorage(int size, int align, int offset)
          Allocate space in code portion of bootimage.
 Address allocateDataStorage(int size, int align, int offset)
          Allocate space in data portion of bootimage.
 void setAddressWord(Address offset, Word value, boolean objField, boolean root)
          Fill in 4/8 bytes of bootimage, as object reference.
 void setByte(Address offset, int value)
          Fill in 1 byte of bootimage.
 void setDoubleWord(Address offset, long value)
          Fill in 8 bytes of bootimage.
 void setFullWord(Address offset, int value)
          Fill in 4 bytes of bootimage, as numeric.
 void setHalfWord(Address offset, int value)
          Fill in 2 bytes of bootimage.
 void setNullAddressWord(Address offset, boolean objField, boolean root)
          Fill in 4 bytes of bootimage, as null object reference.
 

Method Detail

allocateDataStorage

Address allocateDataStorage(int size,
                            int align,
                            int offset)
Allocate space in data portion of bootimage. Moral equivalent of memory managers allocating raw storage at runtime.

Parameters:
size - the number of bytes to allocate
align - the alignment requested; must be a power of 2.
offset - the offset at which the alignment is desired.

allocateCodeStorage

Address allocateCodeStorage(int size,
                            int align,
                            int offset)
Allocate space in code portion of bootimage. Moral equivalent of memory managers allocating raw storage at runtime.

Parameters:
size - the number of bytes to allocate
align - the alignment requested; must be a power of 2.
offset - the offset at which the alignment is desired.

setByte

void setByte(Address offset,
             int value)
Fill in 1 byte of bootimage.

Parameters:
offset - offset of target from start of image, in bytes
value - value to write

setHalfWord

void setHalfWord(Address offset,
                 int value)
Fill in 2 bytes of bootimage.

Parameters:
offset - offset of target from start of image, in bytes
value - value to write

setFullWord

void setFullWord(Address offset,
                 int value)
Fill in 4 bytes of bootimage, as numeric.

Parameters:
offset - offset of target from start of image, in bytes
value - value to write

setAddressWord

void setAddressWord(Address offset,
                    Word value,
                    boolean objField,
                    boolean root)
Fill in 4/8 bytes of bootimage, as object reference.

Parameters:
offset - offset of target from start of image, in bytes
value - value to write
objField - true if this word is an object field (as opposed to a static, or tib, or some other metadata)
root - Does this slot contain a possible reference into the heap? (objField must also be true)

setNullAddressWord

void setNullAddressWord(Address offset,
                        boolean objField,
                        boolean root)
Fill in 4 bytes of bootimage, as null object reference.

Parameters:
offset - offset of target from start of image, in bytes
objField - true if this word is an object field (as opposed to a static, or tib, or some other metadata)
root - Does this slot contain a possible reference into the heap? (objField must also be true)

setDoubleWord

void setDoubleWord(Address offset,
                   long value)
Fill in 8 bytes of bootimage.

Parameters:
offset - offset of target from start of image, in bytes
value - value to write