This problem happened when gcc was compiling a C file named loci.c in Indigo Virtual Switch (IVS) project. My gcc version is 4.8.1. and there is 4GB of swap memory in /dev/sda5 partition.