servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/chunkmgrteststepbase.cpp
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 // Copyright (c) 2008-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 // @file
       
    15 // @internalComponent
       
    16 // 
       
    17 //
       
    18 
       
    19 #include "chunkmgrteststepbase.h"
       
    20 
       
    21 // create an chunk manager instance with default block size alloc & info
       
    22 static const TInt K_BlockSize = 128;
       
    23 static const TInt K_MinGrowth = 64;
       
    24 static const TInt K_ThresholdGrowth = 40;
       
    25 static const TInt K_InitialAllocation = 128;
       
    26 
       
    27 CChunkMgrTestStepBase::CChunkMgrTestStepBase ()
       
    28 	{
       
    29 	}
       
    30 
       
    31 CChunkMgrTestStepBase::~CChunkMgrTestStepBase ()
       
    32 	{
       
    33 	}
       
    34 
       
    35 CChunkManager * CChunkMgrTestStepBase::CreateChunkMgrL ( TInt aMaxHeapSize )
       
    36 	{	
       
    37 	CChunkManager* mgr = CChunkManager::NewL ( aMaxHeapSize );
       
    38 	if ( mgr )
       
    39 		{
       
    40 		mgr->AddPoolL ( K_BlockSize, K_InitialAllocation, K_MinGrowth, K_ThresholdGrowth );
       
    41 		}
       
    42 	
       
    43 	iChkMgr = mgr;
       
    44 			
       
    45 	return mgr;	
       
    46 	}