equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2002 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 the License "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: |
|
15 * Browser App Entry point |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #include "BrowserApplication.h" |
|
22 #include <e32std.h> |
|
23 #include <eikapp.h> |
|
24 #include <eikstart.h> |
|
25 #include "MemoryManager.h" |
|
26 #include <OOMMonitorSession.h> |
|
27 |
|
28 const int KFreeMemoryTarget = 6000000; |
|
29 |
|
30 LOCAL_C CApaApplication* NewApplication( ) |
|
31 { |
|
32 return new CBrowserApplication; |
|
33 } |
|
34 |
|
35 GLDEF_C TInt E32Main() |
|
36 { |
|
37 ROomMonitorSession oomMs; |
|
38 TInt result = oomMs.Connect(); |
|
39 if ( result == KErrNone ) |
|
40 { |
|
41 result = oomMs.RequestFreeMemory( KFreeMemoryTarget ); |
|
42 oomMs.Close(); |
|
43 if ( result == KErrNone ) |
|
44 { |
|
45 RAllocator* oldAllocator = MemoryManager::SwitchToFastAllocator(); |
|
46 result = EikStart::RunApplication( NewApplication ); |
|
47 MemoryManager::CloseFastAllocator(oldAllocator); |
|
48 } |
|
49 } |
|
50 return result; |
|
51 } |
|
52 |
|
53 // End of File |