Just 做 IT

求知若饥 虚心若愚 안년하세요 (•‾̑⌣‾̑•)

Virtual memory exhausted: Cannot allocate memory

1 year ago 0

内存太小,增加内存可以解决。增加虚拟的


   59  dd if=/dev/zero of=/opt/swap bs=1024 count=2048000  
   60  rm -rf swap/
   61  rm -rf swap
   62  dd if=/dev/zero of=/opt/swap bs=1024 count=2048000  
   63  mkswap /opt/swap 
   64  ls -lh
   65  free -m  
   66  top
   67  free -m
   68  mkswap /opt/swap 
   69  swapon swap 
   70  free -m
   71  top
   72  ls

用完也可以关掉


swapoff swap  
rm -rf swap

Write a Comment