limitiation on memory allocation

Chuck Swiger cswiger at
Mon Mar 12 18:48:59 UTC 2007

On Mar 12, 2007, at 11:20 AM, Dima Sorkin wrote:
> 2) 'maxdsiz' -  Yes, as long as I keep 'maxdsiz + maxssiz' below  
> physical
>     memory size - everything is fine. Single process allocates  
> successfully
>     up to 'maxdsiz'.
>                When tried to put 'maxdsiz' > phys mem size,
>      indeed the system failed to boot, in all modes:
>      multiuser, singleuser, safe.
> So I derive from here that there is no way to cause a _single process_
> on FreeBSD to allocate more than physical memory size (?)

It is certainly possible to configure FreeBSD to allow a single  
process to access more memory than is phyiscally installed.  For  
example, I have a machine with 512MB of RAM, and set:

   kern.dfldsiz="1G" /boot/loader.conf, and this works just fine.  Admittedly, when  
a process does exceed 512MB in dsize, the system starts swapping  
quite a bit, but that's how virtual memory works.

However, you cannot set maxdsiz greater than 4GB [1] if you are  
running a 32-bit version of FreeBSD.  Enabling PAE will let the  
kernel access more than 4GB of physical RAM, but nothing is going to  
let a 32-bit system give more than 4 GB [1] to a single process...if  
you want to do that, then you'll need to switch to running a 64-bit  
version of FreeBSD.


[1]: Well, 3.5GB or 3GB, actually...due to the top portion of address  
space being occupied by PCI device space and the kernel.

More information about the freebsd-questions mailing list