webengine/osswebengine/MemoryManager/Inc/MemoryPool.h
branchRCL_3
changeset 48 79859ed3eea9
parent 46 30342f40acbf
child 49 919f36ff910f
equal deleted inserted replaced
47:e1bea15f9a39 48:79859ed3eea9
    19 
    19 
    20 //  INCLUDES
    20 //  INCLUDES
    21 
    21 
    22 #include <e32base.h>
    22 #include <e32base.h>
    23 #include <e32std.h>
    23 #include <e32std.h>
    24 #include <aknglobalnote.h>
    24 #include "MemoryManager.h"
    25 #include <MemoryManager.h>
       
    26 
    25 
    27 // CONSTANTS
    26 // CONSTANTS
    28 
    27 
    29 // MACROS
    28 // MACROS
    30 
    29 
   250     * @return 
   249     * @return 
   251     */   
   250     */   
   252     virtual TUint FreeMemory( TFreeMem& aFree ) = 0;
   251     virtual TUint FreeMemory( TFreeMem& aFree ) = 0;
   253 
   252 
   254     virtual void RestoreRescueBuffer() = 0;
   253     virtual void RestoreRescueBuffer() = 0;
   255     
       
   256     virtual void InitOOMDialog();
       
   257     
       
   258     virtual void ResetOOMDialog();
       
   259     
   254     
   260   protected:
   255   protected:
   261     CMemoryPool() : iNotifier( 0 )   {}
   256     CMemoryPool() : iNotifier( 0 )   {}
   262   
   257   
   263     /**
   258     /**
   359         TAny* DoAlloc( TUint aSize );
   354         TAny* DoAlloc( TUint aSize );
   360         TBool PreCheck( TUint aTotalSize, TUint aMaxBufSize, const TDesC8& aChecker );
   355         TBool PreCheck( TUint aTotalSize, TUint aMaxBufSize, const TDesC8& aChecker );
   361         TUint PostCheck();
   356         TUint PostCheck();
   362         TUint FreeMemory( TFreeMem& aFree );
   357         TUint FreeMemory( TFreeMem& aFree );
   363         void RestoreRescueBuffer();
   358         void RestoreRescueBuffer();
   364         void InitOOMDialog();
       
   365         void ResetOOMDialog();
       
   366 #ifdef OOM_LOGGING         
   359 #ifdef OOM_LOGGING         
   367         void DumpHeapLogs(TInt aFailSize);
   360         void DumpHeapLogs();
   368 #endif        
   361 #endif        
   369     private:
   362     private:
   370     	void InitLocal();
   363     	void InitLocal();
   371     	
   364     	
   372     	RSymbianDLHeap *iAlloc;
   365     	RSymbianDLHeap *iAlloc;
   373     	// Out of memory dialog and localized resource message
       
   374         void ShowOOMDialog();
       
   375         
       
   376         CAknGlobalNote* iOOMErrorDialog;
       
   377         HBufC *iOOMMessage;
       
   378         bool isInitted;
       
   379         bool iOOMDisplayed;
       
   380     };
   366     };
   381 
   367 
   382 #endif
   368 #endif