|
Dillo
|
A simple allocator optimized to handle many small chunks of memory. The chunks can not be free'd individually. Instead the whole zone must be free'd with zoneFree(). More...
#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 |
A simple allocator optimized to handle many small chunks of memory. The chunks can not be free'd individually. Instead the whole zone must be free'd with zoneFree().
|
inline |
References poolSize.
|
inline |
References bulk, pools, and zoneFree().
|
inline |
References strndup().
|
inline |
References zoneAlloc().
Referenced by strdup().
|
inline |
|
inline |
References lout::misc::SimpleVector< T >::get(), poolSize, lout::misc::SimpleVector< T >::setSize(), and lout::misc::SimpleVector< T >::size().
Referenced by ~ZoneAllocator().
|
private |
Referenced by ~ZoneAllocator().
|
private |
|
private |
|
private |
Referenced by ~ZoneAllocator().
|
private |
Referenced by ZoneAllocator(), and zoneFree().
1.8.8