TlsBlockPool

Introduction

I add a new class: TlsBlockPool. And now you can define a ScopeAlloc instance without given parameters:

ScopeAlloc alloc;

It is same as:

ScopeAlloc alloc(TlsBlockPool::instance());

Specification

class TlsBlockPool
{
public:
    TlsBlockPool() { init(); }
    ~TlsBlockPool() { term(); }
 
    static void init();
    static void term();
 
    static BlockPool& instance();
};

Note: TlsBlockPool::init() can be called more than once. each call to TlsBlockPool::init() must be balanced by a corresponding call to TlsBlockPool::term().

page_revision: 0, last_edited: 1209118755|%e %b %Y, %H:%M %Z (%O ago)
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License