#include <misc.hh>
Public Member Functions | |
| ZoneAllocator (size_t poolSize) | |
| ~ZoneAllocator () | |
| void * | zoneAlloc (size_t t) |
| void | zoneFree () |
| const char * | strndup (const char *str, size_t t) |
| const char * | strdup (const char *str) |
Private Attributes | |
| size_t | poolSize |
| size_t | poolLimit |
| size_t | freeIdx |
| SimpleVector< char * > * | pools |
| SimpleVector< char * > * | bulk |
| lout::misc::ZoneAllocator::ZoneAllocator | ( | size_t | poolSize | ) | [inline] |
| lout::misc::ZoneAllocator::~ZoneAllocator | ( | ) | [inline] |
References bulk, pools, and zoneFree().
| const char* lout::misc::ZoneAllocator::strdup | ( | const char * | str | ) | [inline] |
References strndup().
| const char* lout::misc::ZoneAllocator::strndup | ( | const char * | str, | |
| size_t | t | |||
| ) | [inline] |
| void* lout::misc::ZoneAllocator::zoneAlloc | ( | size_t | t | ) | [inline] |
References bulk, freeIdx, lout::misc::SimpleVector< T >::get(), lout::misc::SimpleVector< T >::increase(), poolLimit, pools, poolSize, lout::misc::SimpleVector< T >::set(), and lout::misc::SimpleVector< T >::size().
Referenced by strndup().
| void lout::misc::ZoneAllocator::zoneFree | ( | ) | [inline] |
References bulk, freeIdx, lout::misc::SimpleVector< T >::get(), pools, poolSize, lout::misc::SimpleVector< T >::setSize(), and lout::misc::SimpleVector< T >::size().
Referenced by dw::core::Layout::setWidget(), and ~ZoneAllocator().
SimpleVector<char*>* lout::misc::ZoneAllocator::bulk [private] |
Referenced by zoneAlloc(), ZoneAllocator(), zoneFree(), and ~ZoneAllocator().
size_t lout::misc::ZoneAllocator::freeIdx [private] |
Referenced by zoneAlloc(), ZoneAllocator(), and zoneFree().
size_t lout::misc::ZoneAllocator::poolLimit [private] |
Referenced by zoneAlloc(), and ZoneAllocator().
SimpleVector<char*>* lout::misc::ZoneAllocator::pools [private] |
Referenced by zoneAlloc(), ZoneAllocator(), zoneFree(), and ~ZoneAllocator().
size_t lout::misc::ZoneAllocator::poolSize [private] |
Referenced by zoneAlloc(), and zoneFree().
1.5.9