|
CookMem 1.4.0
A C++ memory context / allocator
|
#include <circularlist.h>
Public Member Functions | |
| void | add (Node *ptr) |
| Node * | remove () |
| bool | remove (Node *chunk) |
| bool | contains (Node *chunk) |
| bool | isEmpty () const |
A circular list maintenance logic.
The Node class should have next and prev variables.
|
inline |
Add a node to the list.
| ptr | a node pointer to be added to the list |
|
inline |
Check if a chunk is in the list
|
inline |
Check if the list is empty.
|
inline |
Remove the first node from the list.
|
inline |
Remove a chunk from the list.
| chunk | the chunk to be removed. |