memana/analyzetoolclient/commandlineengine/internal/inc/catallocs.h
changeset 2 6a82cd05fb1e
parent 1 3ff3fecb12fe
equal deleted inserted replaced
1:3ff3fecb12fe 2:6a82cd05fb1e
     1 /*
       
     2 * Copyright (c) 2009 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: Class representing collection of memory allocations
       
    15 *              in external data gathering.
       
    16 */
       
    17 
       
    18 #ifndef __CATALLOCS_H__
       
    19 #define __CATALLOCS_H__
       
    20 
       
    21 #include "../inc/ATCommonDefines.h"
       
    22 #include "../inc/CATBase.h"
       
    23 #include "../inc/catalloc.h"
       
    24 
       
    25 // Memory allocates and frees handling class.
       
    26 class CATAllocs : public CATBase
       
    27 {
       
    28 public:
       
    29 	
       
    30 	/**
       
    31 	* "old" alloc message (prior to 1.6).
       
    32 	* @param sAllocString allocation string.
       
    33 	*/
       
    34 	void Alloc( const string& sAllocString );
       
    35 
       
    36 	/*
       
    37 	* Alloc header message (multimessage call stack).
       
    38 	* @param sAllocHString allocation string.
       
    39 	*/
       
    40 	void AllocH( const string& sAllocHString );
       
    41 
       
    42 	/*
       
    43 	* Alloc fragment message (fragment of call stack in multimessage alloc).
       
    44 	* @param sAllocFString allocation string.
       
    45 	*/
       
    46 	void AllocF( const string& sAllocFString );
       
    47 
       
    48 	/**
       
    49 	* Free message.
       
    50 	* @param sFreeString string.
       
    51 	*/
       
    52 	void Free( const string& sFreeString );
       
    53 	
       
    54 	/**
       
    55 	* Free header message.
       
    56 	* (not implemented yeat.)
       
    57 	* @param sFreeHString string.
       
    58 	*/
       
    59 	void FreeH( const string& sFreeHString );
       
    60 
       
    61 	/**
       
    62 	* Free fragment message.
       
    63 	* (not implemented yeat.)
       
    64 	* @param sFreeFString string.
       
    65 	*/
       
    66 	void FreeF( const string& sFreeFString );
       
    67 
       
    68 	/**
       
    69 	* Get "leak" list ordered by allocation time.
       
    70 	* @param vLeaklist container where leaks stored.
       
    71 	*/
       
    72 	void GetLeakList( vector<string>& vLeakList);
       
    73 	
       
    74 	/**
       
    75 	* Clear leaks.
       
    76 	*/
       
    77 	void ClearAllocs( void );
       
    78 #ifndef MODULE_TEST
       
    79 private:
       
    80 #endif
       
    81 	// Allocation storage.
       
    82 	map<string, CATAlloc> m_vAllocs;
       
    83 };
       
    84 #endif
       
    85 //EOF