Modifier and Type | Field and Description |
---|---|
private static int[] |
descriptorMap |
private static boolean |
finalized |
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 and Description |
---|
Map() |
Modifier and Type | Method and Description |
---|---|
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) |
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.
|
static boolean |
isFinalized() |
private static final Address MAP_BASE_ADDRESS
null
chunk at the bottome of the space for 64 bitprivate static final int[] descriptorMap
private static final int[] prevLink
private static final int[] nextLink
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 boolean finalized
public Map()
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 requestedpublic static Extent getContiguousRegionSize(Address start)
start
- The start address of the region whose size is being requestedpublic 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 seriesprivate static int freeContiguousChunks(int chunk)
chunk
- The chunk index of the region to be freedpublic static void finalizeStaticSpaceMap()
public static boolean isFinalized()
public static int getDiscontigFreeListPROrdinal(FreeListPageResource pr)
pr
- the resource that wants to share the discontiguous regionpublic static int getAvailableDiscontiguousChunks()
public static int getChunkConsumerCount()
public static Space getSpaceForAddress(Address address)
address
- The address in questionpublic static int getDescriptorForAddress(Address object)
object
- The object in questionprivate static int getChunkIndex(Address address)
address
- The address to be hashedprivate static Address addressForChunkIndex(int chunk)