class SharedMemPager

mutex protected memory pager. More...

Full nameost::SharedMemPager
Definition#include <misc.h>
Inheritsost::MemPager [public ], ost::Mutex [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Protected Methods


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)

SharedMemPager

[protected]

Create a mempager mutex pool.

Parameters:
pagesizefor allocation.

void  purge (void)

purge

[protected]

Purge the memory pool while locked.

Reimplemented from MemPager.

void*  first (size_t size)

first

[protected]

Get the first memory page after locking.

Parameters:
sizeof request.

Returns: allocated memory space.

Reimplemented from MemPager.

void*  alloc (size_t size)

alloc

[protected]

Get the last memory page after locking.

Parameters:
sizeof request.

Returns: allocated memory space.

Reimplemented from MemPager.