// Claim the available heap region as resource.
try {
final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
final Address start = Memory.AVAILABLE_START();
final Extent size = Memory.AVAILABLE_END().toWord().sub(start.toWord()).toExtent();
heapResource = rm.claimMemoryResource(ResourceOwner.SYSTEM, start,
size, ResourceManager.MEMMODE_NORMAL);
} catch (NameNotFoundException ex) {
BootLogInstance.get().fatal("Cannot find resource manager", ex);
} catch (ResourceNotFreeException ex) {