Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Allocator
Class BestFitStrategy  view BestFitStrategy download BestFitStrategy.java

java.lang.Object
  extended byAllocator.BestFitStrategy
All Implemented Interfaces:
FreeMemStrategy

public class BestFitStrategy
extends java.lang.Object
implements FreeMemStrategy

Best Fit Strategy

Version:
$Id: BestFitStrategy.java,v 1.3 2003/05/12 10:04:52 joewhaley Exp $

Field Summary
private  java.util.TreeSet freePool
           
 
Constructor Summary
BestFitStrategy()
           
 
Method Summary
 void addCollection(java.util.Collection c)
           
 void addFreeMem(MemUnit unit)
           
 MemUnit getFreeMem(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

freePool

private java.util.TreeSet freePool
Constructor Detail

BestFitStrategy

public BestFitStrategy()
Method Detail

addFreeMem

public void addFreeMem(MemUnit unit)
Specified by:
addFreeMem in interface FreeMemStrategy

addCollection

public void addCollection(java.util.Collection c)
Specified by:
addCollection in interface FreeMemStrategy

getFreeMem

public MemUnit getFreeMem(int size)
Specified by:
getFreeMem in interface FreeMemStrategy