From c9054ae803ccb0b5c30333ca4d58280dffdaf79c Mon Sep 17 00:00:00 2001 From: kensmith Date: Fri, 28 Dec 2007 05:08:54 +0000 Subject: The limit on datasize in the install environment is 128M. That's a bit too small for today's standards. While loading packages sysinstall blows past this by a LOT but I think (hope...) that's caused by other bugs. I'll look more into why sysinstall's memory use has gotten so out of control as it loads packages but independent of that there really is no reason to leave the limits on datasize and stacksize in place. And they can cause problems for some of the things "modern packages" might be doing via pkg_add which gets run by sysinstall and would inherit the limits. Another insta-MFC probably coming, this is holding up 6.3-RC2. Sysinstall's memory use is so out of control it blows past the current limit before it finishes loading either of the meta-packages kde or gnome... --- usr.sbin/sysinstall/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'usr.sbin') diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c index 149a0dc..bc6e1d9 100644 --- a/usr.sbin/sysinstall/main.c +++ b/usr.sbin/sysinstall/main.c @@ -37,6 +37,8 @@ #include "sysinstall.h" #include #include +#include +#include const char *StartName; /* Initial contents of argv[0] */ @@ -52,6 +54,7 @@ main(int argc, char **argv) { int choice, scroll, curr, max, status; char titlestr[80], *arch, *osrel, *ostype; + struct rlimit rlim; /* Record name to be able to restart */ StartName = argv[0]; @@ -69,6 +72,13 @@ main(int argc, char **argv) return 1; } + /* If installing packages we'll grow a LOT. */ + rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; + if (setrlimit(RLIMIT_DATA, &rlim) != 0) + fprintf(stderr, "Warning: setrlimit() failed.\n"); + if (setrlimit(RLIMIT_STACK, &rlim) != 0) + fprintf(stderr, "Warning: setrlimit() failed.\n"); + #ifdef PC98 { /* XXX */ -- cgit v1.1