class CCL::MemoryPool

Overview

Thread-safe memory pool. More…

#include <memorypool.h>

class MemoryPool: public Core::MemoryPool
{
public:
    // construction

    MemoryPool (uint32 blockSize, uint32 count = 0, CStringPtr name = nullptr);

    // methods

    void dump () const;
    bool checkMemory () const;
    static void dumpAll ();
};

Inherited Members

public:
    // structs

    struct Bucket;

    // methods

    CStringPtr getName () const;
    bool allocate (uint32 count);
    bool grow (uint32 count);
    void deallocate ();
    void* newBlock ();
    void deleteBlock (void* ptr);
    uint32 getBlockSize () const;
    uint32 getBytesAllocated () const;
    float getBlockUtilization () const;
    bool check () const;

Detailed Documentation

Thread-safe memory pool.

The pool uses a lock-free stack.