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

PsnCoherantMemoryManager Class Reference

Memory manager for shared memory managed with sequential coherence. More...

#include <PsnCoherantMemoryManager.h>

Inheritance diagram for PsnCoherantMemoryManager:

Inheritance graph
[legend]
Collaboration diagram for PsnCoherantMemoryManager:

Collaboration graph
[legend]
List of all members.

Public Methods

 PsnCoherantMemoryManager (void *startDsm, size_t sizeDsm, size_t pageSize)
 Constructeur : a n'appeler qu'en exclusion mutuelle sur la zone mémoire gérée par PsnMemoryElementDescriptor::myMemoryManager.

virtual ~PsnCoherantMemoryManager ()
 Desctructeur.

virtual void sync ()
 Synchronise the memory managed by the PsnSharedMemoryManager.

virtual void synchronizeAfterLock (void *beginningAdress, long length)
 synchronize partially the memory as it was when the lock was last obtained


Public Attributes

const unsigned int uniqueCreatorDataOffset
 L'emplacement fixé à l'avance où est stocké l'offset de la structure de donnée contenant l'information partagée.


Protected Methods

virtual PsnMemoryElementDescriptorgetFreeMem ()
 accesseur (plus convertisseur * _freeMem

virtual void setFreeMem (PsnMemoryElementDescriptor *)
 accesseur (plus convertisseur * _freeMem) en écriture

virtual void lock ()
 Proteger le Manager pour un accès en exclusion mutuelle.

virtual void unlock ()
 Lever l'exclusion mutuelle sur le memory manager.

virtual bool lockNeeded ()
 Is a lock needed ? before access to this shared memoryManager.

virtual void * getFromFree (size_t size)
 la zone de mémoire dans lesquels sont stockés les PsnMemoryElementDescriptor doit être vérouillée avant l'appel à cette fonction

virtual void addInFree (void *addr, size_t size)
 la zone de mémoire dans lesquels sont stockés les PsnMemoryElementDescriptor doit être vérouillée avant l'appel à cette fonction


Protected Attributes

PsnMutexLock _accessToLocalData
 the local mutex lock

PsnLock_myLock
 Le verrou associé à la zone de mémoire.

PsnSharedMemoryManager_memoryElementDescriptorMemoryManager
 the shared memory manager which allocates the list of free memory places

PsnMemoryElementDescriptor_freeMem
 head the the list of free memory blocks


Detailed Description

Memory manager for shared memory managed with sequential coherence.

Author:
David Margery
Version:
0.9

Definition at line 30 of file PsnCoherantMemoryManager.h.


Constructor & Destructor Documentation

PsnCoherantMemoryManager::PsnCoherantMemoryManager void *    startDsm,
size_t    sizeDsm,
size_t    pageSize
 

Constructeur : a n'appeler qu'en exclusion mutuelle sur la zone mémoire gérée par PsnMemoryElementDescriptor::myMemoryManager.

virtual PsnCoherantMemoryManager::~PsnCoherantMemoryManager   [virtual]
 

Desctructeur.


Member Function Documentation

virtual void PsnCoherantMemoryManager::addInFree void *    addr,
size_t    size
[protected, virtual]
 

la zone de mémoire dans lesquels sont stockés les PsnMemoryElementDescriptor doit être vérouillée avant l'appel à cette fonction

Parameters:
addr : address of the memory to be freed
size : size asked for when memory was allocated

Implements PsnSharedMemoryManager.

virtual PsnMemoryElementDescriptor* PsnCoherantMemoryManager::getFreeMem   [protected, virtual]
 

accesseur (plus convertisseur * _freeMem

virtual void* PsnCoherantMemoryManager::getFromFree size_t    size [protected, virtual]
 

la zone de mémoire dans lesquels sont stockés les PsnMemoryElementDescriptor doit être vérouillée avant l'appel à cette fonction

Parameters:
size : size of memory to allocate
Returns:
: address of a memory zone of at least size.

Implements PsnSharedMemoryManager.

virtual void PsnCoherantMemoryManager::lock   [protected, virtual]
 

Proteger le Manager pour un accès en exclusion mutuelle.

Après le verrou, on est sur de disposer de la version de la mémoire géree au moins aussi récente que celle disponible sur n'importe quelle processeur après unlock

Implements PsnSharedMemoryManager.

virtual bool PsnCoherantMemoryManager::lockNeeded   [protected, virtual]
 

Is a lock needed ? before access to this shared memoryManager.

Implements PsnSharedMemoryManager.

virtual void PsnCoherantMemoryManager::setFreeMem PsnMemoryElementDescriptor   [protected, virtual]
 

accesseur (plus convertisseur * _freeMem) en écriture

virtual void PsnCoherantMemoryManager::sync   [virtual]
 

Synchronise the memory managed by the PsnSharedMemoryManager.

Implements PsnSharedMemoryManager.

virtual void PsnCoherantMemoryManager::synchronizeAfterLock void *    beginningAdress,
long    length
[virtual]
 

synchronize partially the memory as it was when the lock was last obtained

Parameters:
beginningAdress address of the part of memory to partially synchronize
length size of the bit of memory to synchronize

Implements PsnSharedMemoryManager.

virtual void PsnCoherantMemoryManager::unlock   [protected, virtual]
 

Lever l'exclusion mutuelle sur le memory manager.

Implements PsnSharedMemoryManager.


Member Data Documentation

PsnMutexLock PsnCoherantMemoryManager::_accessToLocalData [protected]
 

the local mutex lock

Definition at line 52 of file PsnCoherantMemoryManager.h.

PsnMemoryElementDescriptor* PsnCoherantMemoryManager::_freeMem [protected]
 

head the the list of free memory blocks

Definition at line 91 of file PsnCoherantMemoryManager.h.

PsnSharedMemoryManager* PsnCoherantMemoryManager::_memoryElementDescriptorMemoryManager [protected]
 

the shared memory manager which allocates the list of free memory places

Definition at line 88 of file PsnCoherantMemoryManager.h.

PsnLock* PsnCoherantMemoryManager::_myLock [protected]
 

Le verrou associé à la zone de mémoire.

Definition at line 85 of file PsnCoherantMemoryManager.h.

const unsigned int PsnCoherantMemoryManager::uniqueCreatorDataOffset
 

L'emplacement fixé à l'avance où est stocké l'offset de la structure de donnée contenant l'information partagée.

Definition at line 39 of file PsnCoherantMemoryManager.h.


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

Documentation generated on Mon Nov 25 15:25:54 2002

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