$OpenBSD: patch-deps_v8_src_platform-posix_cc,v 1.1 2011/06/02 07:21:14 robert Exp $
--- deps/v8/src/platform-posix.cc.orig	Sat May 21 04:40:06 2011
+++ deps/v8/src/platform-posix.cc	Wed Jun  1 14:26:51 2011
@@ -54,6 +54,18 @@
 namespace v8 {
 namespace internal {
 
+
+// Maximum size of the virtual memory.  0 means there is no artificial
+// limit.
+
+intptr_t OS::MaxVirtualMemory() {
+  struct rlimit limit;
+  int result = getrlimit(RLIMIT_DATA, &limit);
+  if (result != 0) return 0;
+  return limit.rlim_cur;
+}
+
+
 // ----------------------------------------------------------------------------
 // Math functions
 
