First public contribution.
1 // Copyright (c) 1995-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 the License "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\mmu\t_chunk3.cpp
20 #include "../misc/prbs.h"
22 RTest test(_L("T_CHUNK3"));
23 const TInt KHeapSize=4096;
25 GLDEF_C TInt E32Main()
32 test.Start(_L("Testing chunk resizing"));
36 TInt r=c1.CreateLocal(0,0x01000000); // initial 0 max 16Mb
38 r=c2.CreateLocal(0,0x01000000); // initial 0 max 16Mb
43 r=c1.Adjust(0x400000); // adjust first chunk to 4Mb
45 r=c1.Adjust(0); // now adjust back to 0
47 r=c1.Adjust(0x100000); // adjust first chunk to 1Mb
49 r=c2.Adjust(0x200000); // now adjust second chunk to 2Mb
52 TUint wait=Random(seed);
53 wait &= 16383; // delay in us between 0 and 16383
54 User::AfterHighRes(wait); // wait for a bit
56 r=c2.Adjust(0); // then back to zero
58 r=c1.Adjust(0); // both chunks back to zero