Fast memory management.

The pool is useful if your program contains multiple small objects. These objects (for example, data packets) are created dynamically and destroyed. In this case the standard memory manager is not effective enough, because it is designed for various memory block sizes. The pool (also known as "node allocator") in this case is more effective, because it doesn't use real memory allocation/deallocation so often.

The omni::pool::ObjPool class is a pool for one memory block size. The omni::pool::Manager class contains several pool objects, and therefore can manage memory blocks of various sizes (within a specific range). The omni::pool::FastObjT class overrides new / delete operators and contains a pool object. So if your class is derived from omni::pool::FastObjT, then fast memory management will be used.

There are one global pool. The omni::pool::mem_get() and omni::pool::mem_put() functions use this global pool to allocate and deallocate memory blocks. The omni::pool::FastObj class overrides new / delete operators and uses the global pool. The omni::pool::Allocator can be used with STL containers, so these containers will use the global pool.


Generated on Wed Jun 6 17:27:47 2007 for OMNI by  doxygen 1.5.2