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

Unified Diff: base/sys_info_posix.cc

Issue 180037: Port some of the base system to FreeBSD. Extracted from... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process_util_posix.cc ('k') | base/third_party/nspr/prcpucfg.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_posix.cc
===================================================================
--- base/sys_info_posix.cc (revision 24732)
+++ base/sys_info_posix.cc (working copy)
@@ -52,7 +52,8 @@
// 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 @@
}
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);
« no previous file with comments | « base/process_util_posix.cc ('k') | base/third_party/nspr/prcpucfg.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698