jeco.dmm.sim2.lib.allocator
Class BuddySystem
java.lang.Object
jeco.dmm.sim2.lib.allocator.Allocator
jeco.dmm.sim2.lib.allocator.SegregatedFreeList
jeco.dmm.sim2.lib.allocator.SegregatedFit
jeco.dmm.sim2.lib.allocator.StrictSegregatedFit
jeco.dmm.sim2.lib.allocator.BuddySystem
public class BuddySystem
- extends StrictSegregatedFit
- Author:
- jlrisco
Constructor Summary |
BuddySystem(BuddySystem.TYPE type,
long minSizeInB,
long maxSizeInB,
boolean allowSplitting,
boolean allowCoalescing)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
protected BuddySystem.TYPE type
baseIndex
protected int baseIndex
BuddySystem
public BuddySystem(BuddySystem.TYPE type,
long minSizeInB,
long maxSizeInB,
boolean allowSplitting,
boolean allowCoalescing)
getType
public BuddySystem.TYPE getType()
setup
public void setup(FreeList.DATA_STRUCTURE dataStructure,
FreeList.ALLOCATION_MECHANISM allocationMechanism,
FreeList.ALLOCATION_POLICY allocationPolicy)
- Overrides:
setup
in class SegregatedFreeList
computeFreeListIndex
public int computeFreeListIndex(long sizeInB)
- Specified by:
computeFreeListIndex
in class StrictSegregatedFit
fibonacci
public static long fibonacci(int n)
coalesce
public Block coalesce(long sizeInB)
- Specified by:
coalesce
in class StrictSegregatedFit
split
public Block split(long sizeInB)
- Specified by:
split
in class StrictSegregatedFit