From owner-freebsd-hackers Sun Dec 21 22:21:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA01847 for hackers-outgoing; Sun, 21 Dec 1997 22:21:56 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA01841 for ; Sun, 21 Dec 1997 22:21:48 -0800 (PST) (envelope-from grog@lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id QAA00506; Mon, 22 Dec 1997 16:47:49 +1030 (CST) (envelope-from grog) Message-ID: <19971222164749.21879@lemis.com> Date: Mon, 22 Dec 1997 16:47:49 +1030 From: Greg Lehey To: Chuck Robey Cc: FreeBSD-Hackers@FreeBSD.ORG Subject: Re: gcc error References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88e In-Reply-To: ; from Chuck Robey on Mon, Dec 22, 1997 at 12:58:23AM -0500 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Mon, Dec 22, 1997 at 12:58:23AM -0500, Chuck Robey wrote: > I was trying to compile ddd version 2.2 for a project, and I got an error: > > ==> Making all in ./ddd... > Building ddd-2.2-i386-unknown-freebsd3.0... > c++ -DHAVE_CONFIG_H -DNDEBUG -O2 -g -Wall -fexternal-templates > -felide-constructors -fconserve-space -c -I. -I. -I./.. > -I/usr/X11R6/include -o ddd.o ddd.C > ddd.C: In function `int main(int, char **)': > ddd.C:2490: virtual memory exhausted > *** Error code 1 > > This can't possibly refer to FreeBSD's memory, seeing as this is a big > machine, with 192M of swap, and it wasn't even fractionally full. I think > it's some gcc/g++ (note it's a C++ file being compiled) problem, but I > don't know how to increase g++'s idea of memory. > > Does anyone else know how? Yes, this is a per-process limit. Check with ulimit or friends: === grog@freebie (/dev/ttyp5) ~ 1 -> ulimit -a core file size (blocks) unlimited data seg size (kbytes) 524288 file size (blocks) unlimited max memory size (kbytes) unlimited stack size (kbytes) 65536 cpu time (seconds) unlimited pipe size (512 bytes) 1 open files 1024 max user processes 120 virtual memory (kbytes) 589824 At a guess, your data seg, stack size or max virtual memory will be too low (I think 32 MB is the absolute minimum for data seg, and that may be too low). Check the sh/bash man page for ulimit. If you use a csh variant, I think the corresponding command is called limit, and it's also in the shell man page. Check also login.conf: that's where your hard limits get set. Greg