jeco.dmm.sim2.lib.allocator
Class SegregatedFreeList
java.lang.Object
jeco.dmm.sim2.lib.allocator.Allocator
jeco.dmm.sim2.lib.allocator.SegregatedFreeList
- Direct Known Subclasses:
- SegregatedFit, SimpleSegregatedStorage
public class SegregatedFreeList
- extends Allocator
Important notes: we can omit header information. It is only useful for
maintaining the free-blocks sortered in every ADM. This information is lost
when the block in allocated. Since we are keeping the internal structure
of ADMS by simulation, we do not have to take into account his kind of
headers.
- Author:
- jlrisco
Constructor Summary |
SegregatedFreeList(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 |
SegregatedFreeList
public SegregatedFreeList(long minSizeInB,
long maxSizeInB,
boolean allowSplitting,
boolean allowCoalescing)
setup
public void setup(FreeList.DATA_STRUCTURE dataStructure,
FreeList.ALLOCATION_MECHANISM fitAlgorithm,
FreeList.ALLOCATION_POLICY policy)
- Specified by:
setup
in class Allocator
malloc
public Block malloc(long sizeInB,
Block hottest)
- We just enter here if we are sure that this allocator is the correct one.
- Specified by:
malloc
in class Allocator
- Parameters:
sizeInB
- Size in byteshottest
- For reliability purposes, the hottest block
- Returns:
- The block created