|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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()
On Intel we align code to 16 bytes as recommended in the optimization manual. |
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(boolean useNT,
Address start,
Extent len)
Zero a region 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 Memory
protected final Address getHeapEndConstant()
getHeapEndConstant
in class Memory
protected final Address getAvailableStartConstant()
getAvailableStartConstant
in class Memory
protected final Address getAvailableEndConstant()
getAvailableEndConstant
in class Memory
protected final byte getLogBytesInAddressConstant()
getLogBytesInAddressConstant
in class Memory
protected final byte getLogBytesInWordConstant()
getLogBytesInWordConstant
in class Memory
protected final byte getLogBytesInPageConstant()
getLogBytesInPageConstant
in class Memory
protected final byte getLogMinAlignmentConstant()
getLogMinAlignmentConstant
in class Memory
protected final int getMaxBytesPaddingConstant()
getMaxBytesPaddingConstant
in class Memory
protected final int getAlignmentValueConstant()
getAlignmentValueConstant
in class Memory
protected final byte getMaxAlignmentShiftConstant()
getMaxAlignmentShiftConstant
in class Memory
public 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 Memory
public final void globalPrepareVMSpace()
Memory
globalPrepareVMSpace
in class Memory
public final void collectorPrepareVMSpace()
Memory
collectorPrepareVMSpace
in class Memory
public final void collectorReleaseVMSpace()
Memory
collectorReleaseVMSpace
in class Memory
public final void globalReleaseVMSpace()
Memory
globalReleaseVMSpace
in class Memory
public final void setHeapRange(int id, Address start, Address end)
Memory
setHeapRange
in class Memory
id
- the heap identifierstart
- the address of the start of the heapend
- the address of the end of the heappublic final int dzmmap(Address start, int size)
Memory
dzmmap
in class Memory
start
- 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)
Memory
mprotect
in class Memory
start
- 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)
Memory
munprotect
in class Memory
start
- 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(boolean useNT, Address start, Extent len)
Memory
zero
in class Memory
useNT
- Use non temporal instructions (if available)start
- Start of address range (inclusive)len
- Length in bytes of range to zeropublic final void dumpMemory(Address start, int beforeBytes, int afterBytes)
Memory
dumpMemory
in class Memory
start
- 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 Memory
public final void isync()
Memory
isync
in class Memory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |