MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
|
Public 成员函数 | |
MemPool (const char *tag) | |
virtual int | init (bool dynamic=true, int pool_num=DEFAULT_POOL_NUM, int item_num_per_pool=DEFAULT_ITEM_NUM_PER_POOL)=0 |
virtual void | cleanup ()=0 |
virtual int | extend ()=0 |
virtual T * | alloc ()=0 |
virtual void | free (T *item)=0 |
virtual string | to_string ()=0 |
const string | get_name () const |
bool | is_dynamic () const |
int | get_size () const |
Protected 属性 | |
pthread_mutex_t | mutex |
int | size |
bool | dynamic |
string | name |
|
pure virtual |
Alloc one frame from memory Pool
在 common::MemPoolSimple< T > , 以及 common::MemPoolSimple< Frame > 内被实现.
|
pure virtual |
Do cleanup job for memory pool
在 common::MemPoolSimple< T > , 以及 common::MemPoolSimple< Frame > 内被实现.
|
pure virtual |
If dynamic has been set, extend current memory pool,
在 common::MemPoolSimple< T > , 以及 common::MemPoolSimple< Frame > 内被实现.
|
pure virtual |
Free one item, the resouce will return to memory Pool
item |
在 common::MemPoolSimple< Frame > , 以及 common::MemPoolSimple< T > 内被实现.
|
pure virtual |
init memory pool, the major job is to alloc memory for memory pool
pool_num,memory | pool's number |
item_num_per_pool,how | many items per pool. |
在 common::MemPoolSimple< T > , 以及 common::MemPoolSimple< Frame > 内被实现.
|
pure virtual |