From owner-freebsd-questions@FreeBSD.ORG Wed Feb 22 11:34:20 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 0E52D16A420 for ; Wed, 22 Feb 2006 11:34:20 +0000 (GMT) (envelope-from zoo9000@hotmail.com) Received: from hotmail.com (bay101-f19.bay101.hotmail.com [64.4.56.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31A9743D79 for ; Wed, 22 Feb 2006 11:34:15 +0000 (GMT) (envelope-from zoo9000@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 22 Feb 2006 03:34:14 -0800 Message-ID: Received: from 64.4.56.200 by by101fd.bay101.hotmail.msn.com with HTTP; Wed, 22 Feb 2006 11:34:11 GMT X-Originating-IP: [195.172.219.66] X-Originating-Email: [zoo9000@hotmail.com] X-Sender: zoo9000@hotmail.com From: "Ken Williams" To: freebsd-questions@freebsd.org Date: Wed, 22 Feb 2006 11:34:11 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 22 Feb 2006 11:34:14.0733 (UTC) FILETIME=[E88C17D0:01C637A3] Subject: 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 11:34:20 -0000 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 two 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_i486_compiler2/jvmg' gmake[3]: Entering directory `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_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_i486_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_i486_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 to add the following entries to /boot/loader.conf and reboot; root$ more /boot/loader.conf kern.maxdsiz="1073741824" # 1GB kern.dfldsiz="1073741824" # 1GB kern.maxssiz="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-space.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