git fatal: Out of memory, malloc failed

204 2018-12-04 05:11:19


Their "faster" way:

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

You can make these changes permanent by adding to /etc/fstab: /swapfile none swap sw 0 0

echo "/swapfile none swap sw 0 0" >>/etc/fstab

They recommend adding to /etc/sysctl.conf:

vm.vfs_cache_pressure = 50