|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object joeq.Allocator.CircularAddressQueue
public class CircularAddressQueue
An implementation of an address queue that uses a circular buffer.
Field Summary | |
---|---|
static int |
QUEUE_WORDS
Size of block (in words) to allocate when we need more space in a queue. |
static boolean |
TRACE
|
Constructor Summary | |
---|---|
CircularAddressQueue()
Create a new CircularAddressQueue. |
Method Summary | |
---|---|
void |
free()
Free the memory associated with this reference queue. |
void |
growQueue(int words)
Grows the queue to the specified size in words. |
Address |
peek()
Returns the first address from this queue, or null if the queue is empty. |
Address |
pull()
Returns and removes an address from this queue, or returns null if the queue is empty. |
void |
push(Address a)
Add the given address to the reference queue. |
int |
size()
Return the number of elements in this queue. |
int |
space()
Return the amount of free space (in words) in this queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean TRACE
public static int QUEUE_WORDS
Constructor Detail |
---|
public CircularAddressQueue()
Method Detail |
---|
public void free()
AddressQueue
free
in interface AddressQueue
public void growQueue(int words)
AddressQueue
growQueue
in interface AddressQueue
public int size()
AddressQueue
size
in interface AddressQueue
public int space()
AddressQueue
space
in interface AddressQueue
public void push(Address a)
AddressQueue
push
in interface AddressQueue
a
- address to addpublic Address pull()
AddressQueue
pull
in interface AddressQueue
public Address peek()
AddressQueue
peek
in interface AddressQueue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |