jeco.dmm.sim2.lib.allocator
Class StrictSegregatedFit

java.lang.Object
  extended by jeco.dmm.sim2.lib.allocator.Allocator
      extended by jeco.dmm.sim2.lib.allocator.SegregatedFreeList
          extended by jeco.dmm.sim2.lib.allocator.SegregatedFit
              extended by jeco.dmm.sim2.lib.allocator.StrictSegregatedFit
Direct Known Subclasses:
BuddySystem, Kingsley

public abstract class StrictSegregatedFit
extends SegregatedFit

Author:
jlrisco

Field Summary
 
Fields inherited from class jeco.dmm.sim2.lib.allocator.Allocator
allowCoalescing, allowSplitting, freeLists, maxSizeInB, metrics, minSizeInB
 
Constructor Summary
StrictSegregatedFit(long minSizeInB, long maxSizeInB, boolean allowSplitting, boolean allowCoalescing)
           
 
Method Summary
abstract  Block coalesce(long sizeInB)
           
abstract  int computeFreeListIndex(long sizeInB)
           
 Block malloc(long sizeInB, Block hottest)
          We just enter here if we are sure that this allocator is the correct one.
abstract  Block split(long sizeInB)
           
 
Methods inherited from class jeco.dmm.sim2.lib.allocator.SegregatedFreeList
setup
 
Methods inherited from class jeco.dmm.sim2.lib.allocator.Allocator
add, canManage, getFreeLists, getMaxSizeInB, getMinSizeInB, isAllowCoalescing, isAllowSplitting, setMaxSizeInB, setMetrics, setMinSizeInB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrictSegregatedFit

public StrictSegregatedFit(long minSizeInB,
                           long maxSizeInB,
                           boolean allowSplitting,
                           boolean allowCoalescing)
Method Detail

malloc

public Block malloc(long sizeInB,
                    Block hottest)
Description copied from class: SegregatedFreeList
We just enter here if we are sure that this allocator is the correct one.

Overrides:
malloc in class SegregatedFreeList
Parameters:
sizeInB - Size in bytes
hottest - For reliability purposes, the hottest block
Returns:
The block created

computeFreeListIndex

public abstract int computeFreeListIndex(long sizeInB)

coalesce

public abstract Block coalesce(long sizeInB)

split

public abstract Block split(long sizeInB)