Subject: Re: "virtual memory exhausted"
To: John Carr <jcarr@msen.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-sun3
Date: 05/15/2002 17:21:20
On Mon, May 13, 2002 at 02:44:12PM -0400, John Carr wrote:
> Hello, all!
> 
> I have what may seem to be a newbie question, but I can't seem to find
> a good answer for it in my searching.
> 
> This has come up before: imlib does not compile, and dies miserably with
> the message "virtual memory exhausted" as shown below:
> 
> cc -DHAVE_CONFIG_H -I. -I. -I.. -I..                            -I../gdk_imlib          -I/usr/pkgsrc/graphics/imlib/work/.buildlink/include/gtk-1.2 -I/usr/pkgsrc/graphics/imlib/work/.buildlink/include/glib/glib-1.2 -I/usr/pkgsrc/graphics/imlib/work/.buildlink/lib/glib/include -I/usr/pkg/share/x11-links/include  -I/usr/pkgsrc/graphics/imlib/work/.buildlink/include  -DENABLE_NLS -I/usr/pkg/share/x11-links/include -I/usr/pkgsrc/graphics/imlib/work/.buildlink/include/gtk-1.2 -I/usr/pkgsrc/graphics/imlib/work/.buildlink/include/glib/glib-1.2 -I/usr/pkgsrc/graphics/imlib/work/.buildlink/lib/glib/include -I/usr/pkg/share/x11-links/include  -I/usr/pkgsrc/graphics/imlib/work/.buildlink/include -O2 -I/usr/pkg/share/x11-links/include -c testimg.c
> testimg.c:16576: virtual memory exhausted
> 
> The confusing part, for me, comes where my hard limit for "datasize" is
> set to 32M and doesn't go any higher. I have 24M RAM on the machine and
> about 128M swap... I'm also not getting any HD errors. During compilation,
> I go about 20M or so into swap before it fails, so my assumption is that
> it's hitting the datasize hard limit. However, any attempt to set the
> datasize larger results in no change in the value from sysctl or 
> limit. 

I guess this is an OS limitation.
You can try patching your kernel binary with gdb to bump the maxdmap variable,
or add
options MAXDSIZ="(xx*1024*1024)"
(change xx to value you want, default is 32) to your kernel config file
and recompile from an empty directory.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--