commsfwutils/commsbufs/version1/mbufmgr/INC/MBufMemoryManager.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Buffer Manager for Protocols - Memory Allocation
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21 */
       
    22 
       
    23 #ifndef MBUFMEMORYMANAGER_H_
       
    24 #define MBUFMEMORYMANAGER_H_
       
    25 
       
    26 // The allocation or real memory for a CMBufPool
       
    27 class CMBufMemoryManager : public CBase
       
    28 	{
       
    29 public:
       
    30 	static CMBufMemoryManager* NewL(TInt aMaxHeapSize);
       
    31 	~CMBufMemoryManager();
       
    32 	
       
    33 	TAny* Alloc(TInt aSize);
       
    34 	void Free(TAny* aPtr);
       
    35 	TInt AllocBytes();
       
    36 
       
    37 private:
       
    38 
       
    39 	CMBufMemoryManager();
       
    40 	void ConstructL(TInt aMaxHeapSize);
       
    41 
       
    42 	RHeap* iHeap;
       
    43 	TUint iLogger;			// alternative to __FLOG_DECLARATION_MEMBER, refer MBuf_Log.h notes
       
    44 
       
    45 	};
       
    46 
       
    47 
       
    48 #endif /*MBUFMEMORYMANAGER_H_*/