Low memory on mining zcash

Im attempted zcash cpu mining with virtual machine linux ubuntu ver 17. After about 2 hours of mining the virtual machine is showing low memory. The VM was set at 10 MB on starting the VM setup,(as per the recommendations) with 2 MB of actual memory, now on increasing the VM in settings, it has made the VM crash.
Any solutions to how to prevent getting this error of low memory?

Iā€™m assuming you mean GB and not MB. If not, that would be a concern.


I have problems on Windows with low memory. I have 8GB of RAM and when I run Chrome with many tabs it crash my miner. You need to increase your memory.

I may have not explained my error correctly, sorry about that. The RAM memory I had allocated to 4 GB.
What the error shown is the system memory of the VM showing low, and the miners stopped mining.