The shared mempager uses a mutex to protect key access methods.
More...
#include <misc.h>
Inherits ost::MemPager, and ost::Mutex.
|
void * | alloc (size_t size) |
| Get the last memory page after locking.
|
|
void * | first (size_t size) |
|
void | purge (void) |
| Purge the memory pool while locked.
|
|
| SharedMemPager (size_t pagesize=4096) |
| Create a mempager mutex pool.
|
|
The shared mempager uses a mutex to protect key access methods.
This class is used when a mempager will be shared by multiple threads.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
mutex protected memory pager.
Definition at line 104 of file misc.h.
◆ SharedMemPager()
ost::SharedMemPager::SharedMemPager |
( |
size_t | pagesize = 4096 | ) |
|
|
protected |
Create a mempager mutex pool.
- Parameters
-
pagesize | page size for allocation. |
name | a name for the pool. |
◆ alloc()
void * ost::SharedMemPager::alloc |
( |
size_t | size | ) |
|
|
protected |
Get the last memory page after locking.
- Returns
- allocated memory space.
- Parameters
-
◆ first()
void * ost::SharedMemPager::first |
( |
size_t | size | ) |
|
|
inlineprotected |
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/ucommon-7.0.0-build/ucommon-7.0.0/inc/commoncpp/misc.h