memory allocation question
peter at wemm.org
Tue Mar 23 19:49:42 PST 2004
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 at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5
More information about the freebsd-amd64