ucommon
7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
![]() ![]() |
Pager pool base class for managed memory pools. More...
#include <memory.h>
Public Member Functions | |
void | put (PagerObject *object) |
Return a pager object back to our free list. More... | |
Protected Member Functions | |
PagerPool () | |
virtual | ~PagerPool () |
PagerObject * | get (size_t size) |
Private Member Functions | |
__DELETE_COPY (PagerPool) | |
Private Attributes | |
LinkedObject * | freelist |
pthread_mutex_t | mutex |
Pager pool base class for managed memory pools.
This is a helper base class for the pager template and generally is not used by itself. If different type pools are intended to use a common memory pager then you will need to mixin a memory protocol object that performs redirection such as the MemoryRedirect class.
|
protected |
Definition at line 926 of file memory.cpp.
|
protectedvirtual |
Definition at line 932 of file memory.cpp.
References mutex.
|
private |
|
protected |
Definition at line 946 of file memory.cpp.
References freelist, mutex, ucommon::LinkedObject::Next, ucommon::PagerObject::pager, and ucommon::PagerObject::reset().
Referenced by ucommon::pager< T >::operator()(), and ucommon::pager< T >::operator*().
void ucommon::PagerPool::put | ( | PagerObject * | object | ) |
Return a pager object back to our free list.
object | to return to pool. |
Definition at line 937 of file memory.cpp.
References ucommon::LinkedObject::enlist(), freelist, and mutex.
Referenced by ucommon::PagerObject::dealloc().
|
private |
Definition at line 827 of file memory.h.
Referenced by get(), PagerPool(), and put().
|
mutableprivate |
Definition at line 828 of file memory.h.
Referenced by get(), PagerPool(), put(), and ~PagerPool().