$OpenBSD: patch-base_sys_info_openbsd_cc,v 1.8 2016/01/06 21:46:44 robert Exp $
--- base/sys_info_openbsd.cc.orig.port	Tue Dec 15 21:05:04 2015
+++ base/sys_info_openbsd.cc	Sun Jan  3 22:19:58 2016
@@ -26,6 +26,8 @@ int64 AmountOfMemory(int pages_name) {
 
 namespace base {
 
+int64 aofpmem = 0;
+
 // static
 int SysInfo::NumberOfProcessors() {
   int mib[] = { CTL_HW, HW_NCPU };
@@ -40,12 +42,11 @@ int SysInfo::NumberOfProcessors() {
 
 // static
 int64 SysInfo::AmountOfPhysicalMemory() {
-  return AmountOfMemory(_SC_PHYS_PAGES);
-}
+  // pledge(2)
+  if (!aofpmem)
+    aofpmem = AmountOfMemory(_SC_PHYS_PAGES);
 
-// static
-int64 SysInfo::AmountOfAvailablePhysicalMemory() {
-  return AmountOfMemory(_SC_AVPHYS_PAGES);
+  return aofpmem;
 }
 
 // static
