On 32-bit machines, if I use a large cache (i.e. large -m) on a linux machine, why sometimes I get “segmentation fault ?
On 32-bit machines, the maximum addressable memory is 4GB. The Linux kernel uses 3:1 split which means user space is 3G and kernel space is 1G. Although there are 3G user space, the maximum dynamic allocation memory is 2G. So, if you specify -m near 2G, the memory will be exhausted. And svm-train will fail when it asks more memory. For more details, please read this article. The easiest solution is to switch to a 64-bit machine. Otherwise, there are two ways to solve this. If your machine supports Intel’s PAE (Physical Address Extension), you can turn on the option HIGHMEM64G in Linux kernel which uses 4G:4G split for kernel and user space. If you don’t, you can try a software `tub’ which can eliminate the 2G boundary for dynamic allocated memory. The `tub’ is available at http://www.bitwagon.com/tub.html.