use of org.vmmagic.pragma.Interruptible in project JikesRVM by JikesRVM.
the class Memory method getVMSpace.
/**
* Return the space associated with/reserved for the VM. In the
* case of Jikes RVM this is the boot image space.<p>
*
* The boot image space must be mapped at the start of available
* virtual memory, hence we use the constructor that requests the
* lowest address in the address space. The address space awarded
* to this space depends on the order in which the request is made.
* If this request is not the first request for virtual memory then
* the Space allocator will die with an error stating that the
* request could not be satisfied. The remedy is to ensure it is
* initialized first.
*
* @return The space managed by the virtual machine. In this case,
* the boot image space is returned.
*/
@Override
@Interruptible
public final ImmortalSpace getVMSpace() {
Offset bootSegmentBytes = BOOT_IMAGE_END.diff(BOOT_IMAGE_DATA_START);
if (VM.VerifyAssertions)
VM._assert(bootSegmentBytes.sGT(Offset.zero()));
int bootSegmentMb = org.jikesrvm.runtime.Memory.alignUp(bootSegmentBytes.toWord().toAddress(), BYTES_IN_CHUNK).toWord().rshl(LOG_BYTES_IN_MBYTE).toInt();
if (bootSpace == null) {
bootSpace = new ImmortalSpace("boot", VMRequest.fixedSize(bootSegmentMb));
}
return bootSpace;
}
use of org.vmmagic.pragma.Interruptible in project JikesRVM by JikesRVM.
the class ObjectHolder method boot.
@Interruptible
public static void boot() {
refs = new Object[POOLSIZE][];
// exercise the method to avoid lazy compilation in the future
Object[] objs = new Object[1];
int p = handinRefs(objs);
getRefAt(p, 0);
cleanRefs(p);
if (VM.TraceOnStackReplacement) {
VM.sysWriteln("ObjectHolder booted...");
}
}
use of org.vmmagic.pragma.Interruptible in project JikesRVM by JikesRVM.
the class DebugUtil method boot.
@Interruptible
static void boot(BootRecord theBootRecord) {
// get addresses of TIBs for RVMArray & RVMClass used for testing Type ptrs
RVMType t = RVMArray.IntArray;
tibForArrayType = ObjectModel.getTIB(t);
tibForPrimitiveType = ObjectModel.getTIB(RVMType.IntType);
t = Magic.getObjectType(BootRecord.the_boot_record);
tibForClassType = ObjectModel.getTIB(t);
}
use of org.vmmagic.pragma.Interruptible in project JikesRVM by JikesRVM.
the class MemoryManager method newNonMovingShortArray.
/**
* Allocates a non moving short array.
*
* @param size The size of the array
* @return the new non moving short array
*/
@NoInline
@Interruptible
public static short[] newNonMovingShortArray(int size) {
if (!VM.runningVM) {
return new short[size];
}
RVMArray arrayType = RVMArray.ShortArray;
int headerSize = ObjectModel.computeArrayHeaderSize(arrayType);
int align = ObjectModel.getAlignment(arrayType);
int offset = ObjectModel.getOffsetForAlignment(arrayType, false);
int width = arrayType.getLogElementSize();
TIB arrayTib = arrayType.getTypeInformationBlock();
return (short[]) allocateArray(size, width, headerSize, arrayTib, Plan.ALLOC_NON_MOVING, align, offset, Plan.DEFAULT_SITE);
}
use of org.vmmagic.pragma.Interruptible in project JikesRVM by JikesRVM.
the class MemoryManager method allocateCode.
/**
* Allocate a CodeArray into a code space.
* Currently the interface is fairly primitive;
* just the number of instructions in the code array and a boolean
* to indicate hot or cold code.
* @param numInstrs number of instructions
* @param isHot is this a request for hot code space allocation?
* @return The array
*/
@NoInline
@Interruptible
public static CodeArray allocateCode(int numInstrs, boolean isHot) {
RVMArray type = RVMType.CodeArrayType;
int headerSize = ObjectModel.computeArrayHeaderSize(type);
int align = ObjectModel.getAlignment(type);
int offset = ObjectModel.getOffsetForAlignment(type, false);
int width = type.getLogElementSize();
TIB tib = type.getTypeInformationBlock();
int allocator = isHot ? Plan.ALLOC_HOT_CODE : Plan.ALLOC_COLD_CODE;
return (CodeArray) allocateArray(numInstrs, width, headerSize, tib, allocator, align, offset, Plan.DEFAULT_SITE);
}
Aggregations