Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Mar 2002 09:47:59 -0800
From:      David Greenman <dg@root.com>
To:        Jason Barnes <jbarnes@c3po.lpl.arizona.edu>
Cc:        Erik Trulsson <ertr1013@student.uu.se>, freebsd-questions@freebsd.org
Subject:   Re: out of memory, but there's plenty left!
Message-ID:  <20020301094759.F35679@nexus.root.com>
In-Reply-To: <20020301055029.A11416-100000@c3po.lpl.arizona.edu>; from jbarnes@c3po.lpl.arizona.edu on Fri, Mar 01, 2002 at 05:52:06AM -0700
References:  <20020301120312.GA32070@student.uu.se> <20020301055029.A11416-100000@c3po.lpl.arizona.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
>
>> > 	I'm running into a problem with my g++ code running out of memory
>> > that might or might not be FreeBSD's fault.  The program says, "out of
>> > memory" and dumps core when it gets to about 512MB in size, but there is
>> > plenty of RAM and swap space left.  Here is the output from 'top' just
>> > before it crashes:
>>
>> A single process is, by default, limited to a maximum of 512MB of data.
>> It is almost certainly this limit you are running into.
>> You can check the current limits with 'ulimit -a'
>> To modify the limit you can recompile the kernel with MAXDSIZ set to
>> the desired limit. Check LINT for details.
>
>	I recompiled the kernel with these new lines:
>
>options         MAXDSIZ="(2048*1024*1024)"
>options         MAXSSIZ="(2048*1024*1024)"
>options         DFLDSIZ="(2048*1024*1024)"
>
>and now everything works without any prolems!  Awesome!  Thank you very
>much for your help!

   That was a bit overly aggressive and will almost certainly cause you
problems. The kernel has to organize the process virtual address space, and
there's only about 3GB available. The above tells the kernel that you want
2GB each for stack and data...which is not going to work like you want.

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
President, TeraSolutions, Inc. - http://www.terasolutions.com
President, Download Technologies, Inc. - http://www.downloadtech.com
Pave the road of life with opportunities.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020301094759.F35679>