NAME
SharedMemPager - The shared mempager uses a mutex to protect key access methods. mutex protected memory pager.
SYNOPSIS
#include <misc.h>
Inherits MemPager, and Mutex.
Protected Methods
SharedMemPager (int pagesize=4096)
Create a mempager mutex pool. void purge (void)
Purge the memory pool while locked. void * first (size_t size)
Get the first memory page after locking. void * alloc (size_t size)
Get the last memory page after locking.
DETAILED DESCRIPTION
The shared mempager uses a mutex to protect key access methods. mutex protected memory pager.
This class is used when a mempager will be shared by multiple threads.
Author: David Sugar <[email protected]>
CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
SharedMemPager::SharedMemPager (int pagesize = 4096) [protected]
Create a mempager mutex pool.
Parameters:
- pagesize
-
page size for allocation.
MEMBER FUNCTION DOCUMENTATION
void* SharedMemPager::alloc (size_t size) [protected, virtual]
Get the last memory page after locking.
Returns: allocated memory space.
Parameters:
- size
-
of request.
Reimplemented from MemPager.
void* SharedMemPager::first (size_t size) [protected, virtual]
Get the first memory page after locking.
Returns: allocated memory space.
Parameters:
- size
-
of request.
Reimplemented from MemPager.
void SharedMemPager::purge (void) [protected]
Purge the memory pool while locked.
Reimplemented from MemPager.
AUTHOR
Generated automatically by Doxygen for CommonC++ from the source code.