|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--Methoden.AllocationMethod
This class works as a template for all implementations of allocation methods. It contains detailed information about the implemented allocation method like a short- and a long-name.
| Field Summary | |
private java.lang.String |
longName
Long name of the allocation method. |
private java.lang.String |
shortName
Short name of the allocation method. |
| Constructor Summary | |
AllocationMethod(java.lang.String sName,
java.lang.String lName)
Creates a new instance of this allocation method. |
|
| Method Summary | |
void |
appendMemoryArea(Memory usedMemory,
MemoryArea newMemoryArea)
Appends a new memory area into the memory structure |
Memory |
buildFreeMemory(Memory usedMemory)
Build up a free memory according to the given used memory. |
Memory |
createRandomUsedMemory(Memory usedMemory)
Creates a new random used memory. |
Memory |
createUsedMemory(int newMemoryAreaCount,
int newMemorySize)
Creates a new empty used memory. |
MemoryArea |
getFreeArea(Memory freeMemory,
int reqSize)
Returns the free memory area that has been selected by the implemented allocation method. |
int |
getFreeAreasCount(Memory freeMemory)
Returns the number of free memory areas. |
int |
getIntFrag(Memory usedMemory)
Returns the internal fragmentation of memory as a percentage. |
java.lang.String |
getLongName()
Returns the long name of this allocation method. |
java.lang.String |
getShortName()
Returns the short name of this allocation method. |
int |
getUsage(Memory usedMemory)
Returns the usage of memory as a percentage. |
boolean |
isUseFullFreeMemoryArea()
Returns true, if the full free memory area should be used. |
void |
mergeMemoryArea(Memory freeMemory,
MemoryArea memoryArea)
Merge the given free memoryArea with the given free memory. |
void |
removeMemoryArea(Memory memory,
int startPos)
Removes the requested memoryArea in the given memory |
void |
removeMemoryAreaProcess(Memory memory,
int processNr)
Removes the memoryArea with the given process number in the given memory |
void |
sortFreeMemory(Memory memory)
Sorts the free memory structure to the needs of the implemented allocation method. |
void |
sortUsedMemory(Memory memory)
Sorts the used memory structure to the needs of the implemented allocation method. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.lang.String shortName
private java.lang.String longName
| Constructor Detail |
public AllocationMethod(java.lang.String sName,
java.lang.String lName)
| Method Detail |
public java.lang.String getShortName()
public java.lang.String getLongName()
public int getFreeAreasCount(Memory freeMemory)
public int getUsage(Memory usedMemory)
public int getIntFrag(Memory usedMemory)
public boolean isUseFullFreeMemoryArea()
public void appendMemoryArea(Memory usedMemory,
MemoryArea newMemoryArea)
public void mergeMemoryArea(Memory freeMemory,
MemoryArea memoryArea)
public void removeMemoryAreaProcess(Memory memory,
int processNr)
public void removeMemoryArea(Memory memory,
int startPos)
public Memory createUsedMemory(int newMemoryAreaCount,
int newMemorySize)
public Memory createRandomUsedMemory(Memory usedMemory)
public Memory buildFreeMemory(Memory usedMemory)
public void sortFreeMemory(Memory memory)
public void sortUsedMemory(Memory memory)
public MemoryArea getFreeArea(Memory freeMemory,
int reqSize)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||