Earlier quoted context omitted.
Aha, I only compile on ARM so I got no room to increase RAM... Is it the same with g++? I have 4GB so I should be able to compile with 4 cores, but the processes only fill 2-3 cores even when I try make -j8 on a 8 core machine and then locks the entire OS until it craps out?! Something is fishy...
A swap file is your friend.
Also I only have 2GB (in 32-bit though)! Xo
High karma HN users are toxic downers.