Date: Wed, 22 Feb 2006 14:00:24 -0800 From: "Derrick Ryalls" <ryallsd@gmail.com> To: "Ken Williams" <zoo9000@hotmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: virtual memory exhausted: Cannot allocate memory Message-ID: <d5eb95fc0602221400h4375bd9fj789c2abdd15d9f33@mail.gmail.com> In-Reply-To: <BAY101-F19079CF31D0DEF1B591CEFBCFD0@phx.gbl> References: <BAY101-F19079CF31D0DEF1B591CEFBCFD0@phx.gbl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2/22/06, Ken Williams <zoo9000@hotmail.com> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d5eb95fc0602221400h4375bd9fj789c2abdd15d9f33>