Commit a9d9b729 authored by jochen@chromium.org's avatar jochen@chromium.org

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
parent 930ca1b5
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment