|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.utility.heap.Map
public class Map
This class manages the mapping of spaces to virtual memory ranges.
Field Summary | |
---|---|
private static int[] |
descriptorMap
|
static GenericFreeList |
globalPageMap
|
private static Lock |
lock
|
private static Address |
MAP_BASE_ADDRESS
set the map base address so that we have an unused null chunk at the bottome of the space for 64 bit |
private static int[] |
nextLink
|
private static int[] |
prevLink
|
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 | |
---|---|
private static Address |
addressForChunkIndex(int chunk)
|
static Address |
allocateContiguousChunks(int descriptor,
Space space,
int chunks,
Address head)
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 anyChunk)
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 |
getChunkConsumerCount()
Return the total number of clients contending for chunks. |
private static int |
getChunkIndex(Address address)
Hash an address to a chunk (this is simply done via bit shifting) |
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. |
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. |
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
null
chunk at the bottome of the space for 64 bit
private static final int[] descriptorMap
private static final int[] prevLink
private static final int[] nextLink
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 final 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 regionpublic static Address allocateContiguousChunks(int descriptor, Space space, int chunks, Address head)
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 requiredhead
- The previous contiguous 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 anyChunk)
anyChunk
- Any 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 int getChunkConsumerCount()
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 getChunkIndex(Address address)
address
- The address to be hashed
private static Address addressForChunkIndex(int chunk)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |