2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef WRTDEVICEAPIS_MEMORY_MANAGER_H_
17 #define WRTDEVICEAPIS_MEMORY_MANAGER_H_
19 #include <API/Memory/IManager.h>
21 namespace WrtPlugins {
24 class Manager : public Api::Memory::IManager
27 static Manager& getInstance();
30 unsigned long getTotal() const;
31 unsigned long getFree() const;
37 * Reads value from meminfo file looking it up using specified regex
39 * Function matches each (whole!) line against specified pattern.
40 * @param pattern Perl-like regular expresion used to search through
42 * @return Found value.
43 * @throw PlatformException If could not find meminfo file.
44 * @throw UnsupportedException If pattern didn't match any line in meminfo
47 unsigned long getMeminfoValue(const char* pattern) const;
53 #endif /* WRTDEVICEAPIS_MEMORY_MANAGER_H_ */