Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Mar 2004 19:49:41 -0800
From:      Peter Wemm <peter@wemm.org>
To:        freebsd-amd64@freebsd.org
Cc:        "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Subject:   Re: memory allocation question
Message-ID:  <200403231949.41997.peter@wemm.org>
In-Reply-To: <200403240325.i2O3Pu71033017@troutmask.apl.washington.edu>
References:  <200403240325.i2O3Pu71033017@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 23 March 2004 07:25 pm, Steven G. Kargl wrote:
> I may have finally talked my boss into updating my computational
> workstation (which runs FreeBSD).  The directions of our computations
> is leading towards massive memory requirement.  So, the question is:
> If I have an AMD64 system with 16GB of memory and appropriate kernel
> options, can a single process allocate >15 GB for its use?

The default malloc limit is 8GB.  I picked that arbitarily because it 
was double 4GB.  It is a tunable that can be changed at boot time.

However.. mmap() is unlimited.  You can use most of the remaining 128TB 
of virtual memory for mmap.  You could also increase the malloc limit 
to nearly 128TB if you wanted to.

The MAXDSIZ value is where malloc is limited.  It defaults to:
#define  MAXDSIZ  (8192UL*1024*1024)
It can be changed at kernel compile time with 'options MAXDSIZ' or 
simply overridden at boot time by setting the tunable kern.maxdsiz.

-- 
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5



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