|
UCommon
|
The shared mempager uses a mutex to protect key access methods. More...
#include <misc.h>
Inherits ost::MemPager, and ost::Mutex.
Protected Member Functions | |
| void * | alloc (size_t size) |
| Get the last memory page after locking. More... | |
| void * | first (size_t size) |
| void | purge (void) |
| Purge the memory pool while locked. | |
| SharedMemPager (size_t pagesize=4096) | |
| Create a mempager mutex pool. More... | |
Additional Inherited Members | |
Public Member Functions inherited from ost::MemPager | |
| void * | alloc (size_t size) |
| char * | alloc (const char *str) |
| char * | first (const char *str) |
| void * | first (size_t size) |
| int | getPages (void) const |
| MemPager (size_t pagesize=4096) | |
| void | purge (void) |
Public Member Functions inherited from ost::Mutex | |
| void | enter (void) |
| void | enterMutex (void) |
| void | leave (void) |
| void | leaveMutex (void) |
| bool | test (void) |
| bool | tryEnterMutex (void) |
Protected Types inherited from ucommon::RecursiveMutex | |
|
typedef autoexclusive < RecursiveMutex > | autolock |
The shared mempager uses a mutex to protect key access methods.
This class is used when a mempager will be shared by multiple threads.
|
protected |
Create a mempager mutex pool.
| pagesize | page size for allocation. |
| name | a name for the pool. |
|
protected |
Get the last memory page after locking.
| size | of request. |
1.8.3.1