#include <SegmentedPool.h>
Inheritance diagram for SegmentedPool:

Public Member Functions | |
| SegmentedPool (size_t nodeCapacity, uint32 nodes) | |
| virtual | ~SegmentedPool () |
| ENABLE_RUNTIME_CLASSTYPE () | |
| virtual void * | allocate (size_t size) |
| virtual void | deallocate (void *ptr) |
| virtual bool | isFull () |
| virtual bool | isEmpty () |
| virtual bool | inPool (void *ptr) |
| void | printInfo () |
| size_t | getNodeCapacity () |
| SegmentedPoolNode * | getPoolNode (void *ptr) |
Private Attributes | |
| uint8 * | startOfPool |
| uint8 * | endOfPool |
| size_t | nodeOffset |
| size_t | nodeCapacity |
| uint32 | nodes |
| uint32 | freeNodeCount |
| SegmentedPoolNode * | firstFree |
| SegmentedPoolNode * | lastFree |
Definition at line 36 of file SegmentedPool.h.
| SegmentedPool::SegmentedPool | ( | size_t | nodeCapacity, | |
| uint32 | nodes | |||
| ) |
Definition at line 52 of file SegmentedPool.cpp.
References endOfPool, firstFree, lastFree, SegmentedPoolNode::nextFree, nodeCapacity, nodeOffset, nodes, SegmentedPoolNode::pool, redzoneSize, SegmentedPoolNode::size, and startOfPool.
| SegmentedPool::~SegmentedPool | ( | ) | [virtual] |
| void * SegmentedPool::allocate | ( | size_t | size | ) | [virtual] |
Implements Pool.
Definition at line 99 of file SegmentedPool.cpp.
References firstFree, freeNodeCount, isFull(), lastFree, SegmentedPoolNode::nextFree, nodeCapacity, redzoneSize, SegmentedPoolNode::size, startOfPool, and SegmentedPoolNode::valgrind_handle.
| void SegmentedPool::deallocate | ( | void * | ptr | ) | [virtual] |
Implements Pool.
Definition at line 135 of file SegmentedPool.cpp.
References firstFree, freeNodeCount, getPoolNode(), inPool(), isFull(), lastFree, SegmentedPoolNode::nextFree, SegmentedPoolNode::pool, SegmentedPoolNode::size, startOfPool, and SegmentedPoolNode::valgrind_handle.
| SegmentedPool::ENABLE_RUNTIME_CLASSTYPE | ( | ) |
Reimplemented from Pool.
| size_t SegmentedPool::getNodeCapacity | ( | ) | [inline] |
Definition at line 54 of file SegmentedPool.h.
| SegmentedPoolNode * SegmentedPool::getPoolNode | ( | void * | ptr | ) |
Definition at line 202 of file SegmentedPool.cpp.
References nodeOffset, and startOfPool.
Referenced by deallocate().
| virtual bool SegmentedPool::inPool | ( | void * | ptr | ) | [inline, virtual] |
Implements Pool.
Definition at line 50 of file SegmentedPool.h.
References endOfPool, and startOfPool.
Referenced by deallocate().
| virtual bool SegmentedPool::isEmpty | ( | ) | [inline, virtual] |
Implements Pool.
Definition at line 48 of file SegmentedPool.h.
References freeNodeCount.
Referenced by ~SegmentedPool().
| virtual bool SegmentedPool::isFull | ( | ) | [inline, virtual] |
Implements Pool.
Definition at line 47 of file SegmentedPool.h.
References freeNodeCount.
Referenced by allocate(), and deallocate().
| void SegmentedPool::printInfo | ( | ) | [virtual] |
Implements Pool.
Definition at line 163 of file SegmentedPool.cpp.
References con, endOfPool, freeNodeCount, max(), min(), nodeCapacity, nodeOffset, nodes, Console::Printf(), SegmentedPoolNode::size, and startOfPool.
uint8* SegmentedPool::endOfPool [private] |
Definition at line 59 of file SegmentedPool.h.
Referenced by inPool(), printInfo(), and SegmentedPool().
SegmentedPoolNode* SegmentedPool::firstFree [private] |
Definition at line 66 of file SegmentedPool.h.
Referenced by allocate(), deallocate(), and SegmentedPool().
uint32 SegmentedPool::freeNodeCount [private] |
Definition at line 64 of file SegmentedPool.h.
Referenced by allocate(), deallocate(), isEmpty(), isFull(), and printInfo().
SegmentedPoolNode* SegmentedPool::lastFree [private] |
Definition at line 67 of file SegmentedPool.h.
Referenced by allocate(), deallocate(), and SegmentedPool().
size_t SegmentedPool::nodeCapacity [private] |
Definition at line 62 of file SegmentedPool.h.
Referenced by allocate(), printInfo(), and SegmentedPool().
size_t SegmentedPool::nodeOffset [private] |
Definition at line 61 of file SegmentedPool.h.
Referenced by getPoolNode(), printInfo(), and SegmentedPool().
uint32 SegmentedPool::nodes [private] |
uint8* SegmentedPool::startOfPool [private] |
Definition at line 58 of file SegmentedPool.h.
Referenced by allocate(), deallocate(), getPoolNode(), inPool(), printInfo(), SegmentedPool(), and ~SegmentedPool().
1.4.7