Update contrib.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Functions for test and analysis of demand paging.
29 The attributes of the demand paging system.
34 The ROM is being demand paged.
39 Individual executable files can be demand paged.
44 User RAM can be demand paged.
50 Return the attributes of the demand paging system.
51 This is a bitfield consisting of values from enum TAttributes
53 IMPORT_C static TUint32 Attributes();
56 Evict the contents of the virtual memory cache and reduce it to its minimum size.
58 @return KErrNone, if successful; otherwise one of the other system wide error codes.
60 @capability WriteDeviceData
62 IMPORT_C static TInt FlushCache();
65 Change the minimum and maximum RAM sizes used for the virtual memory cache.
67 These values may be silently restricted to platforn specific limits.
68 If required, GetCacheSize can be used to verify sizes actually applied to the system.
70 If there is not enough memory to set the specified cache size then KErrNoMemory is
71 returned, however the cache size may still have been modified in an attempt to
74 @param aMinSize Minimum size for cache in bytes.
75 @param aMaxSize Maximum size for cache in bytes.
76 Using zero for this value will restore cache sizes to the
77 initial values used after boot.
79 @return KErrNone, if successful;
80 KErrNoMemory if the is not enough memory;
81 KErrArgument if aMinSize>aMaxSize
82 otherwise one of the other system wide error codes.
84 @capability WriteDeviceData
86 IMPORT_C static TInt SetCacheSize(TUint aMinSize,TUint aMaxSize);
89 Get the current values of the RAM sizes used for the virtual memory cache.
91 @param[out] aMinSize Minimum size for cache in bytes.
92 @param[out] aMaxSize Maximum size for cache in bytes.
93 @param[out] aCurrentSize The current size for cache in bytes.
94 This may be greater than aMaxSize.
96 @return KErrNone, if successful; otherwise one of the other system wide error codes.
98 IMPORT_C static TInt CacheSize(TUint& aMinSize,TUint& aMaxSize,TUint& aCurrentSize);
101 Paging event information.
106 The total number of page faults which have occurred.
108 TUint64 iPageFaultCount;
111 The total number of page faults which resulted in reading a page
114 TUint64 iPageInReadCount;
118 Get paging event information.
120 @param[out] aInfo A descriptor to hold the returned information.
121 The contents of the descriptor are in the form of a #TEventInfo object.
123 @return KErrNone, if successful; otherwise one of the other system wide error codes.
125 IMPORT_C static TInt EventInfo(TDes8& aInfo);