commsfwutils/commsbufs/mbufmgrimpl/inc/MBufMemoryAllocator.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 Buffer Manager for Protocols - Memory Allocation
       
    23 */
       
    24 
       
    25 #ifndef MBUFMEMORYALLOCATOR_H_
       
    26 #define MBUFMEMORYALLOCATOR_H_
       
    27 
       
    28 // The allocation or real memory for a CMBufPool
       
    29 NONSHARABLE_CLASS(CMBufMemoryAllocator) : public CBase
       
    30 	{
       
    31 public:
       
    32 	static CMBufMemoryAllocator* NewL(TInt aMaxHeapSize);
       
    33 	~CMBufMemoryAllocator();
       
    34 	
       
    35 	TAny* Alloc(TInt aSize);
       
    36 	void Free(TAny* aPtr);
       
    37 	TInt AllocBytes();	
       
    38 private:
       
    39 
       
    40 	CMBufMemoryAllocator();
       
    41 	void ConstructL(TInt aMaxHeapSize);
       
    42 
       
    43 	RHeap* iHeap;
       
    44 
       
    45 	};
       
    46 
       
    47 
       
    48 #endif /*MBUFMEMORYALLOCATOR_H_*/