public class ImmixAllocator extends Allocator
Modifier and Type | Field and Description |
---|---|
private boolean |
copy |
private Address |
cursor
bump pointer
|
private boolean |
hot |
private Address |
largeCursor
bump pointer for large objects
|
private Address |
largeLimit
limit for bump pointer for large objects
|
private Address |
limit
limit for bump pointer
|
private int |
line |
private int |
lineUseCount
approximation to bytes allocated (measured at 99% accurate) 07/10/30
|
private Address |
markTable |
private Address |
recyclableBlock |
private boolean |
recyclableExhausted |
private boolean |
requestForLarge
is the current request for large or small?
|
protected ImmixSpace |
space
space this allocator is associated with
|
private boolean |
straddle
did the last allocation straddle a line?
|
Constructor and Description |
---|
ImmixAllocator(ImmixSpace space,
boolean hot,
boolean copy)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
acquireRecyclableBlock() |
private boolean |
acquireRecyclableBlockAddressOrder() |
private boolean |
acquireRecyclableLines(int bytes,
int align,
int offset) |
Address |
alloc(int bytes,
int align,
int offset)
Allocate space for a new object.
|
private Address |
allocSlowHot(int bytes,
int align,
int offset)
Internal allocation slow path.
|
protected Address |
allocSlowOnce(int bytes,
int align,
int offset)
External allocation slow path (called by superclass when slow path is
actually taken.
|
boolean |
getLastAllocLineStraddle() |
Space |
getSpace()
Return the space this allocator is currently bound to.
|
Address |
overflowAlloc(int bytes,
int align,
int offset)
Allocate space for a new object.
|
void |
reset()
Reset the allocator.
|
void |
show()
Print out the status of the allocator (for debugging)
|
private void |
zeroBlock(Address block) |
alignAllocation, alignAllocation, alignAllocationNoFill, allocSlow, allocSlowInline, determineCollectionAttempts, fillAlignmentGap, getMaximumAlignedSize, getMaximumAlignedSize
protected final ImmixSpace space
private final boolean hot
private final boolean copy
private Address largeCursor
private Address largeLimit
private boolean requestForLarge
private boolean straddle
private int lineUseCount
private Address recyclableBlock
private int line
private boolean recyclableExhausted
public ImmixAllocator(ImmixSpace space, boolean hot, boolean copy)
space
- The space to bump point into.hot
- TODOcopy
- TODOpublic void reset()
public final Address alloc(int bytes, int align, int offset)
bytes
- The number of bytes allocatedalign
- The requested alignmentoffset
- The offset from the alignmentpublic final Address overflowAlloc(int bytes, int align, int offset)
bytes
- The number of bytes allocatedalign
- The requested alignmentoffset
- The offset from the alignmentpublic final boolean getLastAllocLineStraddle()
protected final Address allocSlowOnce(int bytes, int align, int offset)
allocSlowOnce
in class Allocator
bytes
- The number of bytes allocatedalign
- The requested alignmentoffset
- The offset from the alignmentprivate Address allocSlowHot(int bytes, int align, int offset)
bytes
- The number of bytes allocatedalign
- The requested alignmentoffset
- The offset from the alignmentprivate boolean acquireRecyclableLines(int bytes, int align, int offset)
private boolean acquireRecyclableBlock()
private boolean acquireRecyclableBlockAddressOrder()
public final Space getSpace()
Allocator
public final void show()