Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: base/sys_info.h

Issue 55913004: Reland "Enable SysInfo::AmountOfPhysicalMemory to be called from within the Linux Sandbox" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Seperate MaxSharedMemorySize and AmountOfPhysicalMemory initialization. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/sys_info_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | base/sys_info_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698