Reason: Insufficient memory, swap insufficient
create partition file, size 4G
[[email protected] ~]# dd if=/dev/zero of=/data/swapfile bs=1k count=40960004096000+0 records in4096000+0 records out4194304000 bytes (4.2 GB) copied, 11.5204 s, 364 MB/s
Generate swap file system
[[email protected] ~]# mkswap /data/swapfilemkswap: /data/swapfile: warning: don‘t erase bootbits sectors on whole disk. Use -f to force.Setting up swapspace version 1, size = 4095996 KiBno label, UUID=579f326b-b767-45e9-88f6-88348eea5414[[email protected] ~]# mkswap -f /data/swapfileSetting up swapspace version 1, size = 4095996 KiBno label, UUID=0b1356c5-b1e2-40c6-9142-627a7e38e2ca
Mount swap file
[[email protected] ~]# swapon /data/swapfile[[email protected] ~]# free -m total used free shared buffers cachedMem: 15948 15746 202 0 378 8830-/+ buffers/cache: 6537 9411Swap: 14239 70 14169
Uninstalling swap Files
[[email protected] ~]# swapoff /data/swapfile[[email protected] ~]# free -m total used free shared buffers cachedMem: 15948 15744 204 0 378 8830-/+ buffers/cache: 6535 9413Swap: 10239 70 10169
To modify the/etc/fstab file, add the following:
/data/swapfile swap swap defaults 0 0
C + +: Internal compiler error:killed