-bash: fork: Cannot allocate memory

I also faced this issue with my Ubuntu 14.04 desktop. Even these basic command showed Can’t allocate memory error. On investigating, found that system is using all the memory for Caching and is not freeing up memory. This is called Cache Ballooning and solved this by clearing the cache.

tech