|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmtk.utility.heap.Map
public class Map
This class manages the mapping of spaces to virtual memory ranges.
| Field Summary | |
|---|---|
private static int[] |
descriptorMap
Class variables |
static GenericFreeList |
globalPageMap
|
private static int[] |
linkageMap
|
private static Lock |
lock
|
private static Address |
MAP_BASE_ADDRESS
|
private static GenericFreeList |
regionMap
|
private static int |
sharedDiscontigFLCount
|
private static FreeListPageResource[] |
sharedFLMap
|
private static Space[] |
spaceMap
|
private static int |
totalAvailableDiscontiguousChunks
|
| Constructor Summary | |
|---|---|
Map()
|
|
| Method Summary | |
|---|---|
static Address |
allocateContiguousChunks(int descriptor,
Space space,
int chunks,
Address previous)
Allocate some number of contiguous chunks within a discontiguous region |
static void |
finalizeStaticSpaceMap()
Finalize the space map, establishing which virtual memory is nailed down, and then placing the rest into a map to be used by discontiguous spaces. |
static void |
freeAllChunks(Address lastChunk)
Free all chunks in a linked list of contiguous chunks. |
static int |
freeContiguousChunks(Address start)
Free some set of contiguous chunks, given the chunk address |
private static int |
freeContiguousChunks(int chunk)
Free some set of contiguous chunks, given the chunk index |
static int |
getAvailableDiscontiguousChunks()
Return the total number of chunks available (unassigned) within the range of virtual memory apportioned to discontiguous spaces. |
static int |
getContiguousRegionChunks(Address start)
Return the size of a contiguous region in chunks. |
static Extent |
getContiguousRegionSize(Address start)
Return the size of a contiguous region in bytes. |
static int |
getDescriptorForAddress(Address object)
Return the space descriptor for the space in which this object resides. |
static int |
getDiscontigFreeListPROrdinal(FreeListPageResource pr)
Return the ordinal number for some free list space wishing to share a discontiguous region. |
static Address |
getNextContiguousRegion(Address start)
Return the address of the next contiguous region associated with some discontiguous space by following the linked list for that space. |
static Space |
getSpaceForAddress(Address address)
Return the space in which this address resides. |
private static int |
hashAddress(Address address)
Hash an address to a chunk (this is simply done via bit shifting) |
static void |
insert(Address start,
Extent extent,
int descriptor,
Space space)
Insert a space and its descriptor into the map, associating it with a particular address range. |
private static Address |
reverseHashChunk(int chunk)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final Address MAP_BASE_ADDRESS
private static final int[] descriptorMap
private static final int[] linkageMap
private static final Space[] spaceMap
private static final GenericFreeList regionMap
public static final GenericFreeList globalPageMap
private static int sharedDiscontigFLCount
private static final FreeListPageResource[] sharedFLMap
private static int totalAvailableDiscontiguousChunks
private static Lock lock
| Constructor Detail |
|---|
public Map()
| Method Detail |
|---|
public static void insert(Address start,
Extent extent,
int descriptor,
Space space)
start - The start address of the region to be associated
with this space.extent - The size of the region, in bytesdescriptor - The descriptor for this spacespace - The space to be associated with this region
public static Address allocateContiguousChunks(int descriptor,
Space space,
int chunks,
Address previous)
descriptor - The descriptor for the space to which these chunks will be assignedspace - The space to which these chunks will be assignedchunks - The number of chunks requiredprevious - The previous contgiuous set of chunks for this space (to create a linked list of contiguous regions for each space)
public static Address getNextContiguousRegion(Address start)
start - The current region (return the next region in the list)
public static int getContiguousRegionChunks(Address start)
start - The start address of the region whose size is being requested
public static Extent getContiguousRegionSize(Address start)
start - The start address of the region whose size is being requested
public static void freeAllChunks(Address lastChunk)
lastChunk - The last chunk in the linked list of chunks to be freedpublic static int freeContiguousChunks(Address start)
start - The start address of the first chunk in the series
private static int freeContiguousChunks(int chunk)
chunk - The chunk index of the region to be freed
public static void finalizeStaticSpaceMap()
public static int getDiscontigFreeListPROrdinal(FreeListPageResource pr)
public static int getAvailableDiscontiguousChunks()
public static Space getSpaceForAddress(Address address)
address - The address in question
public static int getDescriptorForAddress(Address object)
object - The object in question
private static int hashAddress(Address address)
address - The address to be hashed
private static Address reverseHashChunk(int chunk)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||