use of org.mmtk.policy.ImmortalSpace 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;
}
Aggregations