dillo
3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
![]() ![]() |
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 |
|
inline |
Definition at line 565 of file misc.hh.
References bulk, pools, and zoneFree().
|
inline |
|
inline |
|
inline |
Definition at line 571 of file misc.hh.
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().
|
inline |
Definition at line 591 of file misc.hh.
References bulk, freeIdx, lout::misc::SimpleVector< T >::get(), pools, poolSize, lout::misc::SimpleVector< T >::setSize(), and lout::misc::SimpleVector< T >::size().
Referenced by ~ZoneAllocator().
|
private |
Definition at line 554 of file misc.hh.
Referenced by zoneAlloc(), zoneFree(), and ~ZoneAllocator().
|
private |
Definition at line 552 of file misc.hh.
Referenced by zoneAlloc(), and zoneFree().
|
private |
Definition at line 552 of file misc.hh.
Referenced by zoneAlloc().
|
private |
Definition at line 553 of file misc.hh.
Referenced by zoneAlloc(), zoneFree(), and ~ZoneAllocator().
|
private |
Definition at line 552 of file misc.hh.
Referenced by zoneAlloc(), ZoneAllocator(), and zoneFree().