From: jochen@chromium.org Date: Tue, 8 Apr 2014 17:19:15 +0000 (+0000) Subject: Return 0 as maximal amount of physical memory if there is no limit. X-Git-Tag: upstream/4.7.83~9754 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9d9b7298912fd28a48a69111aba069b21e7dfce;p=platform%2Fupstream%2Fv8.git 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 R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/226113006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/platform-posix.cc b/src/platform-posix.cc index 20c2533..d676d5d 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; }