os/kernelhwsrv/kerneltest/e32test/misc/freemem.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1998-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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // e32test\misc\freemem.cpp
    15 // 
    16 //
    17 
    18 #include <e32test.h>
    19 #include <e32hal.h>
    20 
    21 GLDEF_C TInt E32Main()
    22 	{
    23 	RTest test(_L("Available memory"));
    24 	test.Title();
    25 
    26 	TMemoryInfoV1 mem;
    27 	TPckg<TMemoryInfoV1> memPckg(mem);
    28 
    29 	TKeyCode k=EKeyEnter;
    30 	while (k!='x' && k!='X')
    31 		{
    32 		TInt r=UserHal::MemoryInfo(memPckg);
    33 		test(r==KErrNone);
    34 		test.Printf(_L("Free RAM %d\n"),mem.iFreeRamInBytes);
    35 		k=test.Getch();
    36 		}
    37 
    38 	test.Close();
    39 	return 0;
    40 	}