![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cPool.h>
Public Member Functions | |
ITERATE_t | get_BucketAllocQty () const noexcept |
ITERATE_t | get_AllocQty () const noexcept |
bool | isInPool (const void *pObj) const |
cPoolBucket * | AddBucketNew () |
void | FreeBuckets () |
Protected Types | |
typedef cArrayStruct< TYPE > | cPoolBucket |
Protected Member Functions | |
cPoolBase (ITERATE_t nBucketAllocQty=128) noexcept | |
Protected Attributes | |
cArrayStruct< cPoolBucket > | m_aBuckets |
all allocated space. free and used objects. More... | |
ITERATE_t | m_nBucketAllocQty |
how many new objects per bucket. More... | |
allocate an array of arrays of TYPE object. do not deal with the free list/queue here. much faster to allocate fixed/free size stuff in a pool than the regular heap.
|
protected |
|
inlineprotectednoexcept |
nBucketAllocQty = number of items per bucket allocation.
|
inline |
Create an array of m_nBucketAllocQty TYPE objects
|
inline |
Assume all free.
|
inlinenoexcept |
total number of items allocated ASSUME m_nBucketAllocQty is constant.
|
inlinenoexcept |
how many TYPE objects per 'bucket' ?
|
inline |
Is this object in the pool? brute force search.
|
protected |
all allocated space. free and used objects.
|
protected |
how many new objects per bucket.