|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.utility.alloc.Allocator org.mmtk.utility.alloc.LargeObjectAllocator
public abstract class LargeObjectAllocator
This abstract class implements core functionality for a generic large object allocator. The shared VMResource used by each instance is the point of global synchronization, and synchronization only occurs at the granularity of acquiring (and releasing) chunks of memory from the VMResource. Subclasses may require finer grained synchronization during a marking phase, for example.
This is a first cut implementation, with plenty of room for improvement...
Field Summary | |
---|---|
protected BaseLargeObjectSpace |
space
|
Constructor Summary | |
---|---|
LargeObjectAllocator(BaseLargeObjectSpace space)
Constructor |
Method Summary | |
---|---|
Address |
alloc(int bytes,
int align,
int offset)
Allocate space for an object |
protected Address |
allocSlowOnce(int bytes,
int align,
int offset)
Allocate a large object. |
protected BaseLargeObjectSpace |
getSpace()
Return the space this allocator is currently bound to. |
void |
show()
Miscellaneous |
Methods inherited from class org.mmtk.utility.alloc.Allocator |
---|
alignAllocation, alignAllocation, alignAllocationNoFill, allocSlow, allocSlowInline, determineCollectionAttempts, fillAlignmentGap, getMaximumAlignedSize, getMaximumAlignedSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final BaseLargeObjectSpace space
Constructor Detail |
---|
public LargeObjectAllocator(BaseLargeObjectSpace space)
space
- The space with which this large object allocator
will be associated.Method Detail |
---|
protected final BaseLargeObjectSpace getSpace()
Allocator
getSpace
in class Allocator
public final Address alloc(int bytes, int align, int offset)
bytes
- The number of bytes allocatedalign
- The requested alignment.offset
- The alignment offset.
protected final Address allocSlowOnce(int bytes, int align, int offset)
allocSlowOnce
in class Allocator
bytes
- The required size of this space in bytes.offset
- The alignment offset.align
- The requested alignment.
bytes
bytes in size.public void show()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |