summaryrefslogtreecommitdiffstats
path: root/base/sys_info_posix.cc
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 22:25:00 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 22:25:00 +0000
commit4a34ce0854e16bd546f7048dc9364441b62d7ea1 (patch)
tree9ce5e2fb380834cad7ec8f64d7d15f965bd8c752 /base/sys_info_posix.cc
parent1de04bb69e44c7f2d62fb553c0b7e1c9ec6501b3 (diff)
downloadchromium_src-4a34ce0854e16bd546f7048dc9364441b62d7ea1.zip
chromium_src-4a34ce0854e16bd546f7048dc9364441b62d7ea1.tar.gz
chromium_src-4a34ce0854e16bd546f7048dc9364441b62d7ea1.tar.bz2
Port some of the base module to FreeBSD. Extracted from
http://codereview.chromium.org/172032. The patch is contributed by Ben Laurie of Google. Original review URL: http://codereview.chromium.org/180037 R=wtc BUG=none TEST=none Review URL: http://codereview.chromium.org/183016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24950 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sys_info_posix.cc')
-rw-r--r--base/sys_info_posix.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc
index 23156e2..b6cc56a 100644
--- a/base/sys_info_posix.cc
+++ b/base/sys_info_posix.cc
@@ -52,7 +52,8 @@ int SysInfo::NumberOfProcessors() {
// static
int64 SysInfo::AmountOfPhysicalMemory() {
- // _SC_PHYS_PAGES is not part of POSIX and not available on OS X
+ // _SC_PHYS_PAGES is not part of POSIX and not available on OS X or
+ // FreeBSD
#if defined(OS_MACOSX)
struct host_basic_info hostinfo;
mach_msg_type_number_t count = HOST_BASIC_INFO_COUNT;
@@ -67,6 +68,10 @@ int64 SysInfo::AmountOfPhysicalMemory() {
}
return static_cast<int64>(hostinfo.max_mem);
+#elif defined(OS_FREEBSD)
+ // TODO(benl): I have no idea how to get this
+ NOTIMPLEMENTED();
+ return 0;
#else
long pages = sysconf(_SC_PHYS_PAGES);
long page_size = sysconf(_SC_PAGE_SIZE);