analyzetool/dynamicmemoryhook/inc/analyzetoolmemoryallocator.inl
branchRCL_3
changeset 19 da2cedce4920
equal deleted inserted replaced
18:d27dfa8884ad 19:da2cedce4920
       
     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:  Definition for the inline functions of RAnalyzeToolMemoryAllocator.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include <analyzetool/atcommon.h>
       
    21 
       
    22 // -----------------------------------------------------------------------------
       
    23 // RAnalyzeToolMemoryAllocator::IsAddressLoadedCode()
       
    24 // Checks is the given address in loaded code memory area.
       
    25 // -----------------------------------------------------------------------------
       
    26 //
       
    27 inline bool RAnalyzeToolMemoryAllocator::IsAddressLoadedCode( TUint32& aAddress )
       
    28     {
       
    29     // Debug log strings in this function are not used because
       
    30     // this is called so many times.
       
    31     /*
       
    32      * TMemModelAttributes models.
       
    33      * EMemModelTypeDirect      // direct memory model on hardware
       
    34      * EMemModelTypeMoving=1    // moving memory model on hardware
       
    35      * EMemModelTypeMultiple=2  // multiple memory model on hardware
       
    36      * EMemModelTypeEmul=3      // emulation using single host process
       
    37      * Flexible ?
       
    38      */
       
    39     switch( iMemoryModel )
       
    40         {
       
    41         case EMemModelTypeMultiple:
       
    42             // Use low & high limits which define rofs loading->rom area
       
    43             // in multiple memory model.
       
    44             if ( aAddress < KATMultipleMemoryModelLowLimit 
       
    45               || aAddress > KATMultipleMemoryModelHighLimit )
       
    46                 return false;
       
    47             return true;
       
    48         default:
       
    49             return true;
       
    50         }
       
    51     }
       
    52 
       
    53 // End of File
       
    54