webengine/osswebengine/MemoryManager/Inc/MemoryPool.h
branchRCL_3
changeset 49 919f36ff910f
parent 48 79859ed3eea9
equal deleted inserted replaced
48:79859ed3eea9 49:919f36ff910f
    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 "MemoryManager.h"
    24 #include <aknglobalnote.h>
       
    25 #include <MemoryManager.h>
    25 
    26 
    26 // CONSTANTS
    27 // CONSTANTS
    27 
    28 
    28 // MACROS
    29 // MACROS
    29 
    30 
   249     * @return 
   250     * @return 
   250     */   
   251     */   
   251     virtual TUint FreeMemory( TFreeMem& aFree ) = 0;
   252     virtual TUint FreeMemory( TFreeMem& aFree ) = 0;
   252 
   253 
   253     virtual void RestoreRescueBuffer() = 0;
   254     virtual void RestoreRescueBuffer() = 0;
       
   255     
       
   256     virtual void InitOOMDialog();
       
   257     
       
   258     virtual void ResetOOMDialog();
   254     
   259     
   255   protected:
   260   protected:
   256     CMemoryPool() : iNotifier( 0 )   {}
   261     CMemoryPool() : iNotifier( 0 )   {}
   257   
   262   
   258     /**
   263     /**
   354         TAny* DoAlloc( TUint aSize );
   359         TAny* DoAlloc( TUint aSize );
   355         TBool PreCheck( TUint aTotalSize, TUint aMaxBufSize, const TDesC8& aChecker );
   360         TBool PreCheck( TUint aTotalSize, TUint aMaxBufSize, const TDesC8& aChecker );
   356         TUint PostCheck();
   361         TUint PostCheck();
   357         TUint FreeMemory( TFreeMem& aFree );
   362         TUint FreeMemory( TFreeMem& aFree );
   358         void RestoreRescueBuffer();
   363         void RestoreRescueBuffer();
       
   364         void InitOOMDialog();
       
   365         void ResetOOMDialog();
   359 #ifdef OOM_LOGGING         
   366 #ifdef OOM_LOGGING         
   360         void DumpHeapLogs();
   367         void DumpHeapLogs(TInt aFailSize);
   361 #endif        
   368 #endif        
   362     private:
   369     private:
   363     	void InitLocal();
   370     	void InitLocal();
   364     	
   371     	
   365     	RSymbianDLHeap *iAlloc;
   372     	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;
   366     };
   380     };
   367 
   381 
   368 #endif
   382 #endif