编译llvm的时候:collect2:ld terminated with signal 9(或11)
1 Creating a file for 1024 MB size you want:
We will create a /mnt/1024MB.swap swap file and set the permissions so that users cannot read it directly.
[root@localhost mnt]# dd if=/dev/zero of=1024MB.swap bs= count=
chmod /mnt/1024MB.swap
2 Formatting that file to create a swapping device:
mkswap /mnt/1024MB.swap
3 Adding the swap to the running system:
swapon /mnt/1024MB.swap
The additional swap is now available and can be seen by "cat /proc/meminfo or swapon"
4 Making the change permanent:
Edit the /etc/fstab:
vim /etc/fstab
Add this line at the end of the file:
/mnt/1024MB.swap swap swap sw 0 0
Save. After the next reboot the swap will be used automatically.