Subject: Re: ulimit -m vs the real limit on process size?
To: Douglas Troeger <dtroeger@ix.netcom.com>
From: David Maxwell <david@vex.net>
List: port-i386
Date: 06/23/2002 10:21:12
On Fri, Jun 21, 2002 at 09:17:43PM -0400, Douglas Troeger wrote:
>
> I am running 1.5.2, with a generic kernel, on a machine with 256Meg of
> ram. Under bash, ulimit -m returns 250316 (kbytes).
>
> Nonetheless, my scheme processes are being killed by out-of-memory
> errors at 128M, even though top reports that the system has memory
> to spare.
>
> In fact, the following program
>
> --------------------------
>
> #include <stdio.h>
>
> int main()
> {
> while (1) { malloc(4096); }
> }
>
> --------------------------
>
> allocates 128M (according to top), and no more.
>
>
>
> I would be most grateful if someone could explain this to me! Can
> the effective upper limit on process size be increased?
You likely need to raise ulimit -d as well.
The max for this will be 1G on a default kernel. If you need more, you
can adjust /usr/src/sys/arch/i386/include/vmparam.h and compile a
kernel.
See the MAXxxxx defines in that file.
--
David Maxwell, david@vex.net|david@maxwell.net -->
If you don't spend energy getting what you want,
You'll have to spend it dealing with what you get.
- Unknown