class SharedMemPager

mutex protected memory pager. More...

Definition#include <../common/misc.h>
InheritsMemPager, Mutex
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Protected Members


Detailed Description

The shared mempager uses a mutex to protect key access methods. This class is used when a mempager will be shared by multiple threads.

SharedMemPager (int pg = 4096)
[protected]

Create a mempager mutex pool.

Parameters:
pagesizefor allocation.

void purge (void)
[protected]

Purge the memory pool while locked.

Reimplemented from MemPager

void * first (int size)
[protected]

Get the first memory page after locking.

Parameters:
sizeof request.

Returns: allocated memory space.

Reimplemented from MemPager

void * alloc (int size)
[protected]

Get the last memory page after locking.

Parameters:
sizeof request.

Returns: allocated memory space.

Reimplemented from MemPager