|
|||||||||||
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.SegregatedFreeList<S>
public abstract class SegregatedFreeList<S extends SegregatedFreeListSpace>
This abstract class implements the fast past for a segregated free list.
Field Summary | |
---|---|
protected AddressArray |
freeList
The current free lists for the size classes |
protected S |
space
The space |
Constructor Summary | |
---|---|
SegregatedFreeList(S space)
Constructor |
Method Summary | |
---|---|
Address |
alloc(int bytes,
int align,
int offset)
Allocate bytes contiguous bytes of zeroed memory. |
private int |
getSizeClass(int bytes)
Get the size class for a given number of bytes. |
protected S |
getSpace()
Return the space this allocator is currently bound to. |
private int |
sizeClassCount()
The number of distinct size classes. |
Methods inherited from class org.mmtk.utility.alloc.Allocator |
---|
alignAllocation, alignAllocation, alignAllocationNoFill, allocSlow, allocSlowInline, allocSlowOnce, 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 S extends SegregatedFreeListSpace space
protected final AddressArray freeList
Constructor Detail |
---|
public SegregatedFreeList(S space)
space
- The space with which this allocator will be associatedMethod Detail |
---|
protected final S getSpace()
Allocator
getSpace
in class Allocator
public final Address alloc(int bytes, int align, int offset)
bytes
contiguous bytes of zeroed memory.This code implements the fast path, and on failure delegates to the slow path.
bytes
- The size of the object to occupy this space, in bytes.align
- The requested alignment.offset
- The alignment offset.
private int sizeClassCount()
NOTE: For optimal performance this call must be implemented in a way it can be inlined and optimized within the allocation sequence.
private int getSizeClass(int bytes)
NOTE: For optimal performance this call must be implemented in a way it can be inlined and optimized within the allocation sequence.
bytes
- The number of bytes required to accommodate the object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |