$OpenBSD: patch-base_sys_info_openbsd_cc,v 1.9 2016/03/06 10:51:14 robert Exp $
--- base/sys_info_openbsd.cc.orig.port	Wed Feb 24 00:01:57 2016
+++ base/sys_info_openbsd.cc	Sat Mar  5 23:38:02 2016
@@ -29,6 +29,8 @@ int64_t AmountOfMemory(int pages_name) {
 
 namespace base {
 
+int64_t aofpmem = 0;
+
 // static
 int SysInfo::NumberOfProcessors() {
   int mib[] = { CTL_HW, HW_NCPU };
@@ -43,12 +45,10 @@ int SysInfo::NumberOfProcessors() {
 
 // static
 int64_t SysInfo::AmountOfPhysicalMemory() {
-  return AmountOfMemory(_SC_PHYS_PAGES);
-}
-
-// static
-int64_t SysInfo::AmountOfAvailablePhysicalMemory() {
-  return AmountOfMemory(_SC_AVPHYS_PAGES);
+  // pledge(2)
+  if (!aofpmem)
+    aofpmem = AmountOfMemory(_SC_PHYS_PAGES);
+  return aofpmem;
 }
 
 // static
