Re: strange stack limit behavior when allocating more than 2GB mem on 32bit machine

Nicholas Mc Guire <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
On Fri, 21 Aug 2009, Joe wrote:

> Hi Glynn,
> 
> Thanks for your explanation. However as you can see, I got 2GB mem and
> ~10GB swap, totally 12GB.
> 
> With ulimit -s 10240(KB), I can allocate 2.5GB, I guess these are in
> swap, right?
> With ulimit -s unlimited, as you said, kernel reserved 1GB, stack
> reserved 2GB, there are still 12-3=9GB left??
> 
> Why did malloc failed, instead of allocating this abundant swap space?
>
initializing 12GB swap will not change the address space limit unless you
enabled high-memory support in the kernel (CONFIG_HIGHMEM64G=y in your .config)
the limit is not the physical memory (RAM+swap) but the 32bit address space.

hofrat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.