WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] qemu: bump RLIMIT_AS if restricted

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] qemu: bump RLIMIT_AS if restricted
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 11 Jan 2011 10:18:39 +0000
Delivery-date: Tue, 11 Jan 2011 02:19:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Mostly the same as is already being done for several other RLIMIT_*
values.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/vl.c
+++ b/vl.c
@@ -4846,6 +4846,12 @@ int main(int argc, char **argv, char **e
     rl.rlim_cur = rl.rlim_max;
     if (setrlimit(RLIMIT_DATA, &rl) != 0)
        perror("setrlimit(RLIMIT_DATA)");
+    if (getrlimit(RLIMIT_AS, &rl) == 0) {
+       rl.rlim_cur = rl.rlim_max;
+       if (setrlimit(RLIMIT_AS, &rl) != 0)
+          perror("setrlimit(RLIMIT_AS)");
+    } else
+       perror("getrlimit(RLIMIT_AS)");
     rl.rlim_cur = RLIM_INFINITY;
     rl.rlim_max = RLIM_INFINITY;
     if (setrlimit(RLIMIT_RSS, &rl) != 0)



Attachment: qemu-rlimit-as.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>