ctl_pool_base Struct Reference

This is a dynamically grown memory pool class it provides a 'bottomless' expandable pool of like-sized things, typically of the same class, to allocate. More...

#include <ctlnew.h>

Collaboration diagram for ctl_pool_base:

Collaboration graph
[legend]

Data Fields

struct ctl_pool_base_nodefreelist
struct ctl_pool_base_blockblocks
struct ctl_pool_basepoolList
const char * name
size_t unit
size_t delta
size_t cFree
size_t cAlloc

Detailed Description

This is a dynamically grown memory pool class it provides a 'bottomless' expandable pool of like-sized things, typically of the same class, to allocate.

Some debug data is maintained in parallel with the data, in case you wanted to dump these, and also counts of free/allocated data are maintained with a label in case you wanted to do something 'intelligent' at runtime like pre-grow certain pools you know will rapidly jump to some absurd size, or will gradually grow to that size over time and you want to simply reserve it together.

Definition at line 308 of file ctlnew.h.


Field Documentation

Free list

Definition at line 310 of file ctlnew.h.

Referenced by ctl_pool_base_alloc(), ctl_pool_base_free(), ctl_pool_base_grow(), and ctl_pool_base_init().

Keep track of allocated blocks

Definition at line 311 of file ctlnew.h.

Referenced by ctl_pool_base_destroy(), ctl_pool_base_grow(), and ctl_pool_base_init().

List of these pools

Definition at line 312 of file ctlnew.h.

Referenced by ctl_pool_base_init().

const char* ctl_pool_base::name

What this was named on creation

Definition at line 313 of file ctlnew.h.

Referenced by ctl_destroy_all_pools(), and ctl_pool_base_init().

Unit size

Definition at line 314 of file ctlnew.h.

Referenced by ctl_destroy_all_pools(), ctl_pool_base_grow(), and ctl_pool_base_init().

Grow delta rate

Definition at line 315 of file ctlnew.h.

Referenced by ctl_pool_base_alloc(), and ctl_pool_base_init().

Total free blocks

Definition at line 316 of file ctlnew.h.

Referenced by ctl_destroy_all_pools(), ctl_pool_base_alloc(), ctl_pool_base_free(), ctl_pool_base_grow(), and ctl_pool_base_init().

Total allocated blocks

Definition at line 317 of file ctlnew.h.

Referenced by ctl_destroy_all_pools(), ctl_pool_base_alloc(), ctl_pool_base_free(), and ctl_pool_base_init().


The documentation for this struct was generated from the following file:

Generated on Fri Jan 2 15:28:37 2009 for Squat by  doxygen 1.5.6