
Try to add some swap space (run "dd if=/dev/zero of=swapfile bs=1M count=NN ; mkswap swapfile ; swapon swapfile" as root, and replace NN with the desired size). Beware, SD cards are not designed for swapping, and using swap space instead of real memory makes things slow.