|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mmtk.vm.Memory
org.jikesrvm.mm.mmtk.Memory
public class Memory
| Field Summary | |
|---|---|
private static int |
BOOT_SEGMENT_MB
|
private static ImmortalSpace |
bootSpace
|
| Fields inherited from interface org.jikesrvm.HeapLayoutConstants |
|---|
BAD_MAP_COMPRESSION, BOOT_IMAGE_CODE_END, BOOT_IMAGE_CODE_SIZE, BOOT_IMAGE_CODE_START, BOOT_IMAGE_DATA_END, BOOT_IMAGE_DATA_SIZE, BOOT_IMAGE_DATA_START, BOOT_IMAGE_END, BOOT_IMAGE_RMAP_END, BOOT_IMAGE_RMAP_START, MAX_BOOT_IMAGE_RMAP_SIZE, MAXIMUM_MAPPABLE |
| Constructor Summary | |
|---|---|
Memory()
|
|
| Method Summary | |
|---|---|
void |
collectorPrepareVMSpace()
Per-collector preparation for a collection. |
void |
collectorReleaseVMSpace()
Per-collector post-collection work. |
void |
dumpMemory(Address start,
int beforeBytes,
int afterBytes)
Logs the contents of an address and the surrounding memory to the error output. |
int |
dzmmap(Address start,
int size)
Demand zero mmaps an area of virtual memory. |
protected int |
getAlignmentValueConstant()
|
protected Address |
getAvailableEndConstant()
|
protected Address |
getAvailableStartConstant()
|
protected Address |
getHeapEndConstant()
|
protected Address |
getHeapStartConstant()
|
protected byte |
getLogBytesInAddressConstant()
|
protected byte |
getLogBytesInPageConstant()
|
protected byte |
getLogBytesInWordConstant()
|
protected byte |
getLogMinAlignmentConstant()
|
protected byte |
getMaxAlignmentShiftConstant()
|
protected int |
getMaxBytesPaddingConstant()
|
ImmortalSpace |
getVMSpace()
Return the space associated with/reserved for the VM. |
void |
globalPrepareVMSpace()
Global preparation for a collection. |
void |
globalReleaseVMSpace()
Global post-collection work. |
void |
isync()
Wait for all preceeding instructions to complete and discard any prefetched instructions on this processor. |
boolean |
mprotect(Address start,
int size)
Protects access to an area of virtual memory. |
boolean |
munprotect(Address start,
int size)
Allows access to an area of virtual memory. |
void |
setHeapRange(int id,
Address start,
Address end)
Sets the range of addresses associated with a heap. |
void |
sync()
Wait for preceeding cache flush/invalidate instructions to complete on all processors. |
void |
zero(Address start,
Extent len)
Zero a region of memory. |
void |
zeroPages(Address start,
int len)
Zero a range of pages of memory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static ImmortalSpace bootSpace
private static int BOOT_SEGMENT_MB
| Constructor Detail |
|---|
public Memory()
| Method Detail |
|---|
protected final Address getHeapStartConstant()
getHeapStartConstant in class Memoryprotected final Address getHeapEndConstant()
getHeapEndConstant in class Memoryprotected final Address getAvailableStartConstant()
getAvailableStartConstant in class Memoryprotected final Address getAvailableEndConstant()
getAvailableEndConstant in class Memoryprotected final byte getLogBytesInAddressConstant()
getLogBytesInAddressConstant in class Memoryprotected final byte getLogBytesInWordConstant()
getLogBytesInWordConstant in class Memoryprotected final byte getLogBytesInPageConstant()
getLogBytesInPageConstant in class Memoryprotected final byte getLogMinAlignmentConstant()
getLogMinAlignmentConstant in class Memoryprotected final int getMaxBytesPaddingConstant()
getMaxBytesPaddingConstant in class Memoryprotected final int getAlignmentValueConstant()
getAlignmentValueConstant in class Memoryprotected final byte getMaxAlignmentShiftConstant()
getMaxAlignmentShiftConstant in class Memorypublic final ImmortalSpace getVMSpace()
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.
getVMSpace in class Memorypublic final void globalPrepareVMSpace()
globalPrepareVMSpace in class Memorypublic final void collectorPrepareVMSpace()
collectorPrepareVMSpace in class Memorypublic final void collectorReleaseVMSpace()
collectorReleaseVMSpace in class Memorypublic final void globalReleaseVMSpace()
globalReleaseVMSpace in class Memory
public final void setHeapRange(int id,
Address start,
Address end)
setHeapRange in class Memoryid - the heap identifierstart - the address of the start of the heapend - the address of the end of the heap
public final int dzmmap(Address start,
int size)
dzmmap in class Memorystart - the address of the start of the area to be mappedsize - the size, in bytes, of the area to be mapped
public final boolean mprotect(Address start,
int size)
mprotect in class Memorystart - the address of the start of the area to be mappedsize - the size, in bytes, of the area to be mapped
true if successful, otherwise
false
public final boolean munprotect(Address start,
int size)
munprotect in class Memorystart - the address of the start of the area to be mappedsize - the size, in bytes, of the area to be mapped
true if successful, otherwise
false
public final void zero(Address start,
Extent len)
zero in class Memorystart - Start of address range (inclusive)len - Length in bytes of range to zero
Returned: nothing
public final void zeroPages(Address start,
int len)
zeroPages in class Memorystart - Start of address range (must be a page address)len - Length in bytes of range (must be multiple of page size)
public final void dumpMemory(Address start,
int beforeBytes,
int afterBytes)
dumpMemory in class Memorystart - the address of the memory to be dumpedbeforeBytes - the number of bytes before the address to be
includedafterBytes - the number of bytes after the address to be
includedpublic final void sync()
Memory
sync in class Memorypublic final void isync()
Memory
isync in class Memory
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||