diff -r e3cdd00b5ae3 -r 27fe719c32e6 camappengine/Engine/Src/CaeDbgUtilities.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/camappengine/Engine/Src/CaeDbgUtilities.cpp Wed Sep 01 12:23:23 2010 +0100 @@ -0,0 +1,53 @@ +/* +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Utilities for Camera Application Engine. +* +*/ + + +// INCLUDE FILES +#include +#include +#include "CaeDbgUtilities.h" + +// ============================= LOCAL FUNCTIONS =============================== + +#ifdef _DEBUG + +// --------------------------------------------------------------------------- +// PrintMemoryInfo() +// Print memory info. +// Output format: free heap (biggest block), free RAM +// --------------------------------------------------------------------------- +// +void PrintMemoryInfo() + { + // Print memory info + TInt biggestBlock = 0; + TInt available = User::Available( biggestBlock ); + + TMemoryInfoV1Buf membuf; + UserHal::MemoryInfo( membuf ); + TMemoryInfoV1 minfo = membuf(); + + TBuf<256> text; + text.Format( _L( "free heap:%d(%d) Kb, free ram: %d Kb" ), + available / 1024, biggestBlock / 1024, minfo.iFreeRamInBytes / 1024 ); + + LOGTEXT(text); + } + +#endif + +// End of File