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 -- To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html