From f0b7368c685d82537c558c717067e174456d8a3e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 7 Aug 2011 19:49:08 +0000 Subject: [PATCH] * resource.cc (getrlimit): Just return RLIM_INFINITY in a request for RLIMIT_AS. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/resource.cc | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 665f5b9ce..dbbc1e389 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-08-07 Corinna Vinschen + + * resource.cc (getrlimit): Just return RLIM_INFINITY in a request for + RLIMIT_AS. + 2011-08-07 Corinna Vinschen * fhandler_process.cc (format_process_maps): Actually print info about diff --git a/winsup/cygwin/resource.cc b/winsup/cygwin/resource.cc index 43feec02b..3d436b4b4 100644 --- a/winsup/cygwin/resource.cc +++ b/winsup/cygwin/resource.cc @@ -14,6 +14,7 @@ details. */ #include "winsup.h" #include +#include #include "pinfo.h" #include "psapi.h" #include "cygtls.h" @@ -128,6 +129,7 @@ getrlimit (int resource, struct rlimit *rlp) case RLIMIT_CPU: case RLIMIT_FSIZE: case RLIMIT_DATA: + case RLIMIT_AS: break; case RLIMIT_STACK: if (!VirtualQuery ((LPCVOID) &m, &m, sizeof m)) @@ -148,10 +150,6 @@ getrlimit (int resource, struct rlimit *rlp) case RLIMIT_CORE: rlp->rlim_cur = cygheap->rlim_core; break; - case RLIMIT_AS: - rlp->rlim_cur = 0x80000000UL; - rlp->rlim_max = 0x80000000UL; - break; default: set_errno (EINVAL); return -1;