camappengine/Engine/Src/CaeDbgUtilities.cpp
branchRCL_3
changeset 20 e3cdd00b5ae3
parent 19 18fa9327a158
child 21 27fe719c32e6
equal deleted inserted replaced
19:18fa9327a158 20:e3cdd00b5ae3
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Utilities for Camera Application Engine.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <e32std.h>
       
    21 #include <e32svr.h>
       
    22 #include "CaeDbgUtilities.h"
       
    23 
       
    24 // ============================= LOCAL FUNCTIONS ===============================
       
    25 
       
    26 #ifdef _DEBUG
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // PrintMemoryInfo()
       
    30 // Print memory info. 
       
    31 // Output format: free heap (biggest block), free RAM
       
    32 // ---------------------------------------------------------------------------
       
    33 //
       
    34 void PrintMemoryInfo()
       
    35     {
       
    36     // Print memory info
       
    37     TInt biggestBlock = 0;
       
    38     TInt available = User::Available( biggestBlock );
       
    39 
       
    40     TMemoryInfoV1Buf membuf;
       
    41     UserHal::MemoryInfo( membuf );
       
    42     TMemoryInfoV1 minfo = membuf();
       
    43 
       
    44     TBuf<256> text;
       
    45     text.Format( _L( "free heap:%d(%d) Kb, free ram: %d Kb" ), 
       
    46         available / 1024, biggestBlock / 1024, minfo.iFreeRamInBytes / 1024 );
       
    47 
       
    48     LOGTEXT(text);
       
    49     }
       
    50 
       
    51 #endif
       
    52 
       
    53 // End of File