Chromium Code Reviews| 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; |
| } |