OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_SYS_INFO_H_ | 5 #ifndef BASE_SYS_INFO_H_ |
6 #define BASE_SYS_INFO_H_ | 6 #define BASE_SYS_INFO_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // http://crbug.com/148884 | 68 // http://crbug.com/148884 |
69 // Returns the CPU model name of the system. If it can not be figured out, | 69 // Returns the CPU model name of the system. If it can not be figured out, |
70 // an empty string is returned. | 70 // an empty string is returned. |
71 static std::string CPUModelName(); | 71 static std::string CPUModelName(); |
72 | 72 |
73 // Return the smallest amount of memory (in bytes) which the VM system will | 73 // Return the smallest amount of memory (in bytes) which the VM system will |
74 // allocate. | 74 // allocate. |
75 static size_t VMAllocationGranularity(); | 75 static size_t VMAllocationGranularity(); |
76 | 76 |
77 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 77 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
78 // Returns the maximum SysV shared memory segment size. | 78 // Returns the maximum SysV shared memory segment size, or zero if there is no |
| 79 // limit. |
79 static size_t MaxSharedMemorySize(); | 80 static size_t MaxSharedMemorySize(); |
80 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 81 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
81 | 82 |
82 #if defined(OS_CHROMEOS) | 83 #if defined(OS_CHROMEOS) |
83 typedef std::map<std::string, std::string> LsbReleaseMap; | 84 typedef std::map<std::string, std::string> LsbReleaseMap; |
84 | 85 |
85 // Returns the contents of /etc/lsb-release as a map. | 86 // Returns the contents of /etc/lsb-release as a map. |
86 static const LsbReleaseMap& GetLsbReleaseMap(); | 87 static const LsbReleaseMap& GetLsbReleaseMap(); |
87 | 88 |
88 // If |key| is present in the LsbReleaseMap, sets |value| and returns true. | 89 // If |key| is present in the LsbReleaseMap, sets |value| and returns true. |
(...skipping 26 matching lines...) Expand all Loading... |
115 static std::string GetDeviceName(); | 116 static std::string GetDeviceName(); |
116 | 117 |
117 static int DalvikHeapSizeMB(); | 118 static int DalvikHeapSizeMB(); |
118 static int DalvikHeapGrowthLimitMB(); | 119 static int DalvikHeapGrowthLimitMB(); |
119 #endif // defined(OS_ANDROID) | 120 #endif // defined(OS_ANDROID) |
120 }; | 121 }; |
121 | 122 |
122 } // namespace base | 123 } // namespace base |
123 | 124 |
124 #endif // BASE_SYS_INFO_H_ | 125 #endif // BASE_SYS_INFO_H_ |
OLD | NEW |