webengine/osswebengine/MemoryManager/Inc/MemoryPool.h
changeset 1 7c90e6132015
parent 0 dd21522fd290
child 10 a359256acfc6
--- a/webengine/osswebengine/MemoryManager/Inc/MemoryPool.h	Mon Mar 30 12:54:55 2009 +0300
+++ b/webengine/osswebengine/MemoryManager/Inc/MemoryPool.h	Fri May 08 08:25:06 2009 +0300
@@ -331,4 +331,35 @@
         TUint iRescueBufferSize;
     };
 
+class RSymbianDLHeap;
+
+/**
+*  The memory pool using new symbian DLMalloc/Slab hybrid allocator for fast allocation
+*  @lib memman.lib
+*  @since 3.1
+*/
+NONSHARABLE_CLASS(CNewSymbianHeapPool) : public CMemoryPool
+    {
+    public:
+    	CNewSymbianHeapPool();
+    	~CNewSymbianHeapPool();
+    	
+        TBool Create();
+    	
+        TAny* Allocate( TUint aSize )   { return AllocFromPool( aSize ); }
+        TAny* ReAllocate( TAny* aPtr, TUint aSize );
+        void Free( TAny* aPtr );
+        TUint MemorySize( TAny* aPtr );
+        void SetRescueBufferSize( TInt aSize );
+        TAny* DoAlloc( TUint aSize );
+        TBool PreCheck( TUint aTotalSize, TUint aMaxBufSize, const TDesC8& aChecker );
+        TUint PostCheck();
+        TUint FreeMemory( TFreeMem& aFree );
+        void RestoreRescueBuffer();
+    private:
+    	void InitLocal();
+    	
+    	RSymbianDLHeap *iAlloc;
+    };
+
 #endif