From owner-freebsd-questions@FreeBSD.ORG Wed Feb 22 22:00:29 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7BA816A420 for ; Wed, 22 Feb 2006 22:00:29 +0000 (GMT) (envelope-from ryallsd@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AE3843D5F for ; Wed, 22 Feb 2006 22:00:25 +0000 (GMT) (envelope-from ryallsd@gmail.com) Received: by xproxy.gmail.com with SMTP id t10so1158781wxc for ; Wed, 22 Feb 2006 14:00:24 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Y0/QyYGtOEtrxl4KkblGXk3bSt4Z34z58OSGqQg1EEwjdr7hv6PYkl06trctyej3ftCSmxol3YjWUOppKnunNTD2CmjHJKoXJ9BNN+XZNkwDh60fH1PA0ZQQXV+D7pdJpVh87dCkAv8pseRmUIUypSBhpL/GQSSVXKlPtYprO40= Received: by 10.70.43.8 with SMTP id q8mr2935042wxq; Wed, 22 Feb 2006 14:00:24 -0800 (PST) Received: by 10.70.42.6 with HTTP; Wed, 22 Feb 2006 14:00:24 -0800 (PST) Message-ID: Date: Wed, 22 Feb 2006 14:00:24 -0800 From: "Derrick Ryalls" To: "Ken Williams" In-Reply-To: MIME-Version: 1.0 References: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: virtual memory exhausted: Cannot allocate memory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2006 22:00:29 -0000 On 2/22/06, Ken Williams wrote: > > > Hi FreeBSD folks, > > I'm having trouble compiling the java/jdk15 package. I've downloaded > the > files from Sun and eyesbeyond, as per usual. When I go to the jdk15 > directory and do 'make' the compilation starts and runs for an hour or tw= o > and then grinds to a halt with the following error message; > > -------------------------------------------------------------------------= ----- > gmake[3]: Leaving directory > > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i= 486_compiler2/jvmg' > gmake[3]: Entering directory > > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i= 486_compiler2/jvmg' > Compiling ../generated/adfiles/ad_i486.cpp > virtual memory exhausted: Cannot allocate memory > gmake[3]: *** [ad_i486.o] Error 1 > gmake[3]: Leaving directory > > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i= 486_compiler2/jvmg' > gmake[2]: *** [the_vm] Error 2 > gmake[2]: Leaving directory > > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i= 486_compiler2/jvmg' > gmake[1]: *** [jvmg] Error 2 > gmake[1]: Leaving directory > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp' > gmake: *** [jvmg] Error 2 > *** Error code 2 > > Stop in /usr/ports/java/jdk15. > > -------------------------------------------------------------------------= ----- > > The PC I'm using has a 2.3GHz Pentium, with 128MB memory and 70GB free > disk space > running FreeBSD-6.1PRERELEASE. Interestingly, when I run 'make' and do > 'top' > the compilation process steadily grows to 128MB in size and then stays at > that size until it grinds to a halt. > > I was under the impression that FreeBSD imposed a default maximum > process > size of 512MB, maybe that's changed or I was wrong (anyone ??). After > Googling, I found that the way to increase the maximum process size was t= o > add the following entries to /boot/loader.conf and reboot; > > root$ more /boot/loader.conf > kern.maxdsiz=3D"1073741824" # 1GB > kern.dfldsiz=3D"1073741824" # 1GB > kern.maxssiz=3D"134217728" # 128MB > > I did this and tried compiling jdk15 again but it made no difference. > > So I had the idea that another way to increase the amount of virtual > memory available is to increase the amount of swap memory available > (correct > ??) which I did (to 1GB) as described in the Handbook here > ( > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/adding-swap-spa= ce.html > ). > This I did, and when I do 'top' it shows up as available swap memory but > when I tried compiling jdk15 again it also made no difference. > > I've also checked my resource limits (ulimit) but they look reasonable > to > me; > > root$ ulimit -SHacdflmnpstuv > core file size (blocks, -c) unlimited > data seg size (kbytes, -d) 524288 > file size (blocks, -f) unlimited > max locked memory (kbytes, -l) unlimited > max memory size (kbytes, -m) unlimited > open files (-n) 1735 > pipe size (512 bytes, -p) 1 > stack size (kbytes, -s) 65536 > cpu time (seconds, -t) unlimited > max user processes (-u) 867 > virtual memory (kbytes, -v) unlimited > > > For info, I also have java/linux-sun-jdk14 installed with linprocfs > mounted (to bootstrap the jdk15 installation) but I don't think this is > related to my problem. > > I'm at a bit of a loss what to do next. Do I need to buy some more > memory > for my PC (just to compile jdk15) or is there anything else I can try or > change in FreeBSD which may help me ? > > Any help is much appreciated. > > Ken > > My video card has more memory than your system does. Do you have any swap space mounted/available? /etc/fstab will tell you if you have a swap partition. If you do (and it i= s big) then I am not sure what the issue is, but is does sound like the syste= m is short on memory. If you have no swap space partitioned, there is a way to make a swapfile, but I have never done it myself.