Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

mySharedAllocator Class Reference

an allocator alloacting in the shared memory manager with old alloactor syntax More...

#include <mySharedAllocator.h>

List of all members.

Public Types

typedef size_t size_type
typedef ptrdiff_t difference_type
typedef void * pointer

Public Methods

: incorect usage of the class mySharedMemoryAllocator
 mySharedAllocator () throw ()
 construtor

 mySharedAllocator (const mySharedAllocator &) throw ()
 copy constructor

 ~mySharedAllocator () throw ()
 destructor


Static Public Methods

pointer allocate (size_type n, const void *=0)
 allocate memory

void deallocate (pointer p, size_type n)
 free memory


Detailed Description

an allocator alloacting in the shared memory manager with old alloactor syntax

Definition at line 27 of file mySharedAllocator.h.


Member Typedef Documentation

typedef ptrdiff_t mySharedAllocator::difference_type
 

Definition at line 30 of file mySharedAllocator.h.

typedef void* mySharedAllocator::pointer
 

Definition at line 31 of file mySharedAllocator.h.

Referenced by allocate(), and deallocate().

typedef size_t mySharedAllocator::size_type
 

Definition at line 29 of file mySharedAllocator.h.

Referenced by allocate(), and deallocate().


Constructor & Destructor Documentation

mySharedAllocator::mySharedAllocator   throw ()
 

construtor

mySharedAllocator::mySharedAllocator const mySharedAllocator &    throw ()
 

copy constructor

mySharedAllocator::~mySharedAllocator   throw ()
 

destructor


Member Function Documentation

pointer mySharedAllocator::allocate size_type    n,
const void *    = 0
[inline, static]
 

allocate memory

Definition at line 44 of file mySharedAllocator.h.

References PsnSharedMemoryManager::lockIfNeeded(), PsnSharedMemoryManager::mmalloc(), pointer, size_type, PsMomeController::STLSharedMemoryManager, and PsnSharedMemoryManager::unlockIfNeeded().

00044                                                           {
00045       PsnSharedMemoryManager * STLManager = PsMomeController::STLSharedMemoryManager;
00046       STLManager->lockIfNeeded();
00047       pointer resul(STLManager->mmalloc(n));
00048       STLManager->unlockIfNeeded();
00049       return resul;
00050    }

void mySharedAllocator::deallocate pointer    p,
size_type    n
[inline, static]
 

free memory

Definition at line 53 of file mySharedAllocator.h.

References PsnSharedMemoryManager::lockIfNeeded(), PsnSharedMemoryManager::mfree(), pointer, size_type, PsMomeController::STLSharedMemoryManager, and PsnSharedMemoryManager::unlockIfNeeded().

00053                                                   {
00054       PsnSharedMemoryManager * STLManager = PsMomeController::STLSharedMemoryManager;
00055       STLManager->lockIfNeeded();
00056       STLManager->mfree(p,n);
00057       STLManager->unlockIfNeeded();
00058    }


The documentation for this class was generated from the following file:
logo OpenMask

Documentation generated on Mon Nov 25 15:26:14 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001