camerauis/cameraxui/cxengine/src/cxememorymonitorprivate.cpp
changeset 46 c826656d6714
parent 28 3075d9b614e6
equal deleted inserted replaced
42:feebad15db8c 46:c826656d6714
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    13 *
    13 *
    14 * Description:
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 
    17 
       
    18 #include "cxememorymonitorprivate.h"
       
    19 
       
    20 #ifdef Q_OS_SYMBIAN
    18 #include <hal.h>
    21 #include <hal.h>
       
    22 #endif // Q_OS_SYMBIAN
    19 
    23 
    20 #include "cxutils.h"
    24 #include "cxutils.h"
    21 #include "cxenamespace.h"
    25 #include "cxenamespace.h"
    22 #include "cxefeaturemanager.h"
    26 #include "cxefeaturemanager.h"
    23 #include "cxememorymonitorprivate.h"
       
    24 
    27 
    25 namespace
    28 namespace
    26 {
    29 {
    27     const int FREEING_RETRIES = 2;
    30     const int FREEING_RETRIES = 2;
    28     const int MONITORING_INTERVAL = 10*1000; // in milliseconds
    31     const int MONITORING_INTERVAL = 10*1000; // in milliseconds
    34 CxeMemoryMonitorPrivate::CxeMemoryMonitorPrivate(CxeFeatureManager &features)
    37 CxeMemoryMonitorPrivate::CxeMemoryMonitorPrivate(CxeFeatureManager &features)
    35     : mFeatures(features)
    38     : mFeatures(features)
    36 {
    39 {
    37     CX_DEBUG_ENTER_FUNCTION();
    40     CX_DEBUG_ENTER_FUNCTION();
    38 
    41 
    39     mFeatures.configuredValues(CxeRuntimeKeys::FREE_MEMORY_LEVELS, mLevels);
    42     mFeatures.configuredValues(CxeVariationKeys::FREE_MEMORY_LEVELS, mLevels);
    40 
    43 
    41     CX_DEBUG(("CxeMemoryMonitorPrivate - trigger level: %d bytes", mLevels.value(Cxe::FreeMemoryTrigger)));
    44     CX_DEBUG(("CxeMemoryMonitorPrivate - trigger level: %d bytes", mLevels.value(Cxe::FreeMemoryTrigger)));
    42     CX_DEBUG(("CxeMemoryMonitorPrivate - target level:  %d bytes", mLevels.value(Cxe::FreeMemoryTarget)));
    45     CX_DEBUG(("CxeMemoryMonitorPrivate - target level:  %d bytes", mLevels.value(Cxe::FreeMemoryTarget)));
    43 
    46 
    44 #ifdef Q_OS_SYMBIAN
    47 #ifdef Q_OS_SYMBIAN