Subject: Re: virtual memory exhausted
To: Mark Willey <willeyma@expert.cc.purdue.edu>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
List: port-i386
Date: 07/05/1996 00:01:18
>>  > 	building standard compat library
>>  > 	ld -X -z -T F8100000 -o netbsd -e start ${SYSTEM_OBJ} vers.o
>>  > 	ld: virtual memory exhausted

>> Your shell is enforcing an insufficient resource limit on the amount of 
>> memory you can use.  You may want to unlimit memoryuse, datasize, etc. 
>> Also, I seem to recall that there is some relationship between "maxusers" 
>> and the default resource limits, but I forget exactly what they are ...

>I am having this problem now too, when building a huge kernel.  The
>maxusers on the kernel I am using (to try to get around this) is 999!  So,
>I can't imagine that's it.  I've even tried setting the value of some
>things in /src/sys/conf/param.h directly, but can't figure out which one to
>change.  The ones that look like they depend on maxusers don't seem to
>address this particular problem.  I'm probably looking at the wrong place.

Have you tried something as simple as asking your shell to set a
higher limit?  In tcsh:

[root@MindBender]~# limit
cputime         unlimited
filesize        unlimited
datasize        16384 kbytes
stacksize       512 kbytes
coredumpsize    unlimited
memoryuse       20560 kbytes
descriptors     64 
memorylocked    6854 kbytes
maxproc         80 
[root@MindBender]~# unlimit 
[root@MindBender]~# limit
cputime         unlimited
filesize        unlimited
datasize        262144 kbytes
stacksize       8192 kbytes
coredumpsize    unlimited
memoryuse       20564 kbytes
descriptors     3404 
memorylocked    20564 kbytes
maxproc         1044 

I think the key stat here is datasize, although stacksize might also
be important.

>I don't think it's my shell because I'm running ksh.

Of course it's not ksh itself breaking the compile.  What he's saying
is that your shell is probably giving you defaults that are too low
for what you want to do.  Have you asked ksh to give you higher
limits?

-----------------------------------------------------------------------------
  Michael L. VanLoon                                 michaelv@HeadCandy.com
        --<  Free your mind and your machine -- NetBSD free un*x  >--
    NetBSD working ports: 386+PC, Mac 68k, Amiga, Atari 68k, HP300, Sun3,
        Sun4/4c/4m, DEC MIPS, DEC Alpha, PC532, VAX, MVME68k, arm32...
    NetBSD ports in progress: PICA, others...

   Roll your own Internet access -- Seattle People's Internet cooperative.
                  If you're in the Seattle area, ask me how.
-----------------------------------------------------------------------------