When I try to compile Phalcon, I get an error:
virtual memory exhausted: Cannot allocate memory
I am running the following commands
git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install
I have a VPS with 1GB RAM
Add more swapfile may help. I met this problem when tried to compile YouCompleteMe for vim, solved it by adding swapfile.
https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-14-04