| Modifier and Type | Field and Description |
|---|---|
private static int |
BOOT_SEGMENT_MB |
private static ImmortalSpace |
bootSpace |
private static int |
LOG_BYTES_IN_PAGE_LIE
A lie about the size of a virtual memory page.
|
| Constructor and Description |
|---|
Memory() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
private static final int LOG_BYTES_IN_PAGE_LIE
private static ImmortalSpace bootSpace
private static final int BOOT_SEGMENT_MB
public Memory()
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()
MemoryglobalPrepareVMSpace in class Memorypublic final void collectorPrepareVMSpace()
MemorycollectorPrepareVMSpace in class Memorypublic final void collectorReleaseVMSpace()
MemorycollectorReleaseVMSpace in class Memorypublic final void globalReleaseVMSpace()
MemoryglobalReleaseVMSpace in class Memorypublic final void setHeapRange(int id, Address start, Address end)
MemorysetHeapRange in class Memoryid - 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)
Memorypublic final boolean mprotect(Address start, int size)
Memorypublic final boolean munprotect(Address start, int size)
Memorymunprotect in class Memorystart - the address of the start of the area to be mappedsize - the size, in bytes, of the area to be mappedtrue if successful, otherwise
falsepublic final void zero(boolean useNT, Address start, Extent len)
Memorypublic final void dumpMemory(Address start, int beforeBytes, int afterBytes)
MemorydumpMemory 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