MySQL 5.6.14 Source Code Document
|
#include <ArrayPool.hpp>
Classes | |
struct | Cache |
struct | LockFun |
Public Member Functions | |
bool | setSize (Uint32 noOfElements, bool align=false, bool exit_on_error=true, bool guard=true, Uint32 paramId=0) |
bool | set (T *, Uint32 cnt, bool align=false) |
void | clear () |
Uint32 | getNoOfFree () const |
Uint32 | getSize () const |
Uint32 | getUsed () const |
Uint32 | getUsedHi () const |
void | updateFreeMin (void) |
void | decNoFree (void) |
void | decNoFree (Uint32 cnt) |
Uint32 | getEntrySize () const |
void | getPtr (Ptr< T > &) |
void | getPtr (ConstPtr< T > &) const |
void | getPtr (Ptr< T > &, bool CrashOnBoundaryError) |
void | getPtr (ConstPtr< T > &, bool CrashOnBoundaryError) const |
T * | getPtr (Uint32 i) |
const T * | getConstPtr (Uint32 i) const |
T * | getPtr (Uint32 i, bool CrashOnBoundaryError) |
const T * | getConstPtr (Uint32 i, bool CrashOnBoundaryError) const |
void | getPtr (Ptr< T > &, Uint32 i) |
void | getPtr (ConstPtr< T > &, Uint32 i) const |
void | getPtr (Ptr< T > &, Uint32 i, bool CrashOnBoundaryError) |
void | getPtr (ConstPtr< T > &, Uint32 i, bool CrashOnBoundaryError) const |
bool | seize (Ptr< T > &) |
bool | seizeId (Ptr< T > &, Uint32 i) |
bool | findId (Uint32 i) const |
void | release (Uint32 i) |
void | release (Ptr< T > &) |
bool | seize (LockFun, Cache &, Ptr< T > &) |
void | release (LockFun, Cache &, Uint32 i) |
void | release (LockFun, Cache &, Ptr< T > &) |
void | releaseList (LockFun, Cache &, Uint32 n, Uint32 first, Uint32 last) |
void | setChunkSize (Uint32 sz) |
void | releaseList (Uint32 n, Uint32 first, Uint32 last) |
Protected Member Functions | |
void | releaseChunk (LockFun, Cache &, Uint32 n) |
bool | seizeChunk (Uint32 &n, Ptr< T > &) |
void | releaseChunk (Uint32 n, Uint32 first, Uint32 last) |
Uint32 | seizeN (Uint32 n) |
void | releaseN (Uint32 base, Uint32 n) |
Protected Attributes | |
Uint32 | firstFree |
Uint32 | size |
Uint32 | noOfFree |
Uint32 | noOfFreeMin |
T * | theArray |
void * | alloc_ptr |
Friends | |
class | Array< T > |
Template class used for implementing an pool of object (in an array with a free list)
Definition at line 43 of file ArrayPool.hpp.
|
inline |
Check if i is allocated.
Definition at line 808 of file ArrayPool.hpp.
Update p value for ptr according to i value
Definition at line 439 of file ArrayPool.hpp.
|
inline |
Get pointer for i value
Definition at line 531 of file ArrayPool.hpp.
Update p & i value for ptr according to i value
Definition at line 485 of file ArrayPool.hpp.
|
inline |
Return an object to pool
Reimplemented in SafeArrayPool< T >, and SafeArrayPool< GlobalPage >.
Definition at line 955 of file ArrayPool.hpp.
Return an object to pool
Reimplemented in SafeArrayPool< T >, and SafeArrayPool< GlobalPage >.
Definition at line 993 of file ArrayPool.hpp.
|
inline |
Release a singel linked list in o(1)
first | i-value of first element in list |
last | i-value of last element in list |
Definition at line 911 of file ArrayPool.hpp.
|
inlineprotected |
Deallocate n consecutive object to pool starting from base
Definition at line 870 of file ArrayPool.hpp.
Allocate an object from pool - update Ptr
Return i
Reimplemented in SafeArrayPool< T >, and SafeArrayPool< GlobalPage >.
Definition at line 723 of file ArrayPool.hpp.
Allocate object i from pool - update Ptr
Definition at line 761 of file ArrayPool.hpp.
|
protected |
Allocate n consecutive object from pool return base
Definition at line 820 of file ArrayPool.hpp.
|
inline |
Set the size of the pool
Note, can currently only be called once
Set next pointers
Definition at line 302 of file ArrayPool.hpp.