print address space limit only if limited

This commit is contained in:
roberto@sirius
2010-02-04 11:48:09 +01:00
parent e7b346d3d9
commit d83a685d01
+4 -1
View File
@@ -951,7 +951,10 @@ int main(int argc, char *argv[], char *envp[]) {
}
if (!getrlimit(RLIMIT_AS, &rl)) {
fprintf(stderr,"your process address space limit is %lld bytes (%lld MB)\n", (long long) rl.rlim_max, (long long) rl.rlim_max/1024/1024);
// check for overflow
if (rl.rlim_max + 1 != 0) {
fprintf(stderr,"your process address space limit is %lld bytes (%lld MB)\n", (long long) rl.rlim_max, (long long) rl.rlim_max/1024/1024);
}
}
uwsgi.page_size = getpagesize();