No Matches
pool Class Reference

a pool allocator class More...

#include <liblts_bisim_dnj.h>

Detailed Description

a pool allocator class

This class allocates a large chunk of memory at once and hands out smaller parts. It is supposed to be more efficient than calling new/delete, in particular because it assumes that T is trivially destructible, so it won't call destructors. It allows to store elements of different sizes.

Internally, it keeps a (single-linked) list of large chunks of size BLOCKSIZE. Each chunk contains a data area; for all chunks except the first one, this area is completely in use.

There is a free list, a (single-linked) list of elements in the chunks that have been freed. However, all elements in the free list have to have the same size as type T.

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