SharedMemPager(3cc)

SharedMemPager3cc

The shared mempager uses a mutex to protect key access methods. mutex protected memory pager.

Usage

#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.

From libcommoncpp2-dev 1.0.13-5 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.