Reviewers: Michael Starzinger,

Description:
Return 0 as maximal amount of physical memory if there is no limit.

That's what the comment says should happen, and what Heap's ctor
expects.

BUG=none
LOG=n
[email protected]

Please review this at https://codereview.chromium.org/226113006/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+1, -0 lines):
  M src/platform-posix.cc


Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index 20c25338bed7f6db26d24ef1e17686c666db9785..d676d5d168a0a758a8be6a9d7796687d88e62015 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -96,6 +96,7 @@ intptr_t OS::MaxVirtualMemory() {
   struct rlimit limit;
   int result = getrlimit(RLIMIT_DATA, &limit);
   if (result != 0) return 0;
+  if (limit.rlim_cur == RLIM_INFINITY) return 0;
   return limit.rlim_cur;
 }



--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to