It really depends on how good your CPU is and how much RAM you have (though running out of RAM is rare when compiling in my experience, it did happen on my Raspberry Pi) and 4GB is enough in your case. If you run top you should see a process called cplusplus using a lot of CPU resources. If you used something like make -jX where X is the number of threads specified, it's easily possible to max out CPU utilization and seemingly hang your computer.
Out of curiosity, is there anything in particular that is preventing you from getting a 64-bit distro?
Out of curiosity, is there anything in particular that is preventing you from getting a 64-bit distro?
