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

PsnCoherantMemoryManager.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of openMask © INRIA, CNRS, Universite de Rennes 1 1993-2002, thereinafter the Software
00003  * 
00004  * The Software has been developped within the Siames Project. 
00005  * INRIA, the University of Rennes 1 and CNRS jointly hold intellectual property rights
00006  * 
00007  * The Software has been registered with the Agence pour la Protection des
00008  * Programmes (APP) under registration number IDDN.FR.001.510008.00.S.P.2001.000.41200
00009  *
00010  * This file may be distributed under the terms of the Q Public License
00011  * version 1.0 as defined by Trolltech AS of Norway and appearing in the file
00012  * LICENSE.QPL included in the packaging of this file.
00013  *
00014  * Licensees holding valid specific licenses issued by INRIA, CNRS or Université de Rennes 1 
00015  * for the software may use this file in accordance with that specific license *
00016  */
00017 #ifndef PsnCoherantMemoryManagerHEADER
00018 #define PsnCoherantMemoryManagerHEADER
00019 
00020 class PsnMemoryElementDescriptor;
00021 class PsnLock;
00022 
00023 #include <PsnSharedMemoryManager.h>
00024 
00030 class PsnCoherantMemoryManager : public PsnSharedMemoryManager {
00031 public:
00033    PsnCoherantMemoryManager(void *startDsm, size_t sizeDsm, size_t pageSize);
00036    virtual ~PsnCoherantMemoryManager();
00037 
00039    const unsigned int uniqueCreatorDataOffset;
00040 
00042    virtual void sync() ;
00043 
00048    virtual void synchronizeAfterLock(void* beginningAdress, long length);
00049 
00050 protected:
00052    PsnMutexLock _accessToLocalData;
00053 
00055    virtual PsnMemoryElementDescriptor * getFreeMem();
00056 
00058    virtual void setFreeMem(PsnMemoryElementDescriptor *); 
00059 
00063    virtual void lock();
00064 
00067    virtual void unlock();
00068 
00070    virtual bool lockNeeded ( ) ;
00071 
00076    virtual void * getFromFree ( size_t size );
00077 
00082    virtual void addInFree (void *addr, size_t size);
00083 
00085    PsnLock * _myLock;
00086 
00088    PsnSharedMemoryManager * _memoryElementDescriptorMemoryManager ;
00089 
00091    PsnMemoryElementDescriptor * _freeMem ;
00092 };
00093 
00094 #endif
00095 
00096 

logo OpenMask

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

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