#include <MemoryPool.h>
Public Member Functions | |
FreeIndexNode () | |
void | set_ptr (FreeHeader *ptr) |
void | set_sizes (size_t size, size_t limit) |
bool | contains (size_t size) |
FreeHeader * | ptr () |
unsigned int | size () const |
Private Attributes | |
size_t | size_ |
size of buffer | |
size_t | limit_ |
upper_limit of buffer size (one too large) | |
FreeHeader * | ptr_ |
points to smallest free alloc of size_ or larger |
Node of free index. Should point to smallest free block of the range from size (inclusive) to limit (non inclusive). If multiple free allocations of the smallest size in range exist, should point to the one which is the "smallest" (in free list order).
Definition at line 93 of file MemoryPool.h.
OpenDDS::DCPS::FreeIndexNode::FreeIndexNode | ( | ) |
Definition at line 147 of file MemoryPool.cpp.
bool OpenDDS::DCPS::FreeIndexNode::contains | ( | size_t | size | ) | [inline] |
FreeHeader* OpenDDS::DCPS::FreeIndexNode::ptr | ( | void | ) | [inline] |
Get this node's free block
Definition at line 105 of file MemoryPool.h.
References ptr_.
Referenced by OpenDDS::DCPS::FreeIndex::find().
00105 { return ptr_; }
void OpenDDS::DCPS::FreeIndexNode::set_ptr | ( | FreeHeader * | ptr | ) | [inline] |
Set the free alloc this node points to
Definition at line 97 of file MemoryPool.h.
References ptr_.
Referenced by OpenDDS::DCPS::FreeIndex::add(), and OpenDDS::DCPS::FreeIndex::remove().
Set the sizes for this node
Definition at line 155 of file MemoryPool.cpp.
Referenced by OpenDDS::DCPS::FreeIndex::init().
unsigned int OpenDDS::DCPS::FreeIndexNode::size | ( | void | ) | const [inline] |
Get this node's minimum size
Definition at line 107 of file MemoryPool.h.
References size_.
00107 { return static_cast<unsigned int>(size_); }
size_t OpenDDS::DCPS::FreeIndexNode::limit_ [private] |
upper_limit of buffer size (one too large)
Definition at line 111 of file MemoryPool.h.
Referenced by contains(), and set_sizes().
FreeHeader* OpenDDS::DCPS::FreeIndexNode::ptr_ [private] |
points to smallest free alloc of size_ or larger
Definition at line 112 of file MemoryPool.h.
size_t OpenDDS::DCPS::FreeIndexNode::size_ [private] |
size of buffer
Definition at line 110 of file MemoryPool.h.
Referenced by contains(), set_sizes(), and size().