Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2002 09:26:56 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Stephen Montgomery-Smith <stephen@math.missouri.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: allocating memory
Message-ID:  <15615.25376.119686.377821@grasshopper.cs.duke.edu>
In-Reply-To: <3CFEEB99.AEDC5DB9@math.missouri.edu>
References:  <3CFEEB99.AEDC5DB9@math.missouri.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

Stephen Montgomery-Smith writes:
 > I have access to a rather large computer (3GB of RAM) and I would like
 > to write a program to access most of this memory.  I find that I am
 > unable to malloc more than about 0.5 GB of memory, even if I do it in

Check your per-process limits.

Also, rebuild your kernel after increasing MAXDSIZ:
(from LINT)
#
# Certain applications can grow to be larger than the 128M limit
# that FreeBSD initially imposes.  Below are some options to
# allow that limit to grow to 256MB, and can be increased further
# with changing the parameters.  MAXDSIZ is the maximum that the
# limit can be set to, and the DFLDSIZ is the default value for
# the limit.  MAXSSIZ is the maximum that the stack limit can be
# set to.  You might want to set the default lower than the max, 
# and explicitly set the maximum with a shell command for processes
# that regularly exceed the limit like INND.
#
options         MAXDSIZ="(256*1024*1024)"
options         MAXSSIZ="(256*1024*1024)"
options         DFLDSIZ="(256*1024*1024)"


Drew

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




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