Well, the easiest way is to add virtual memory, but if you're on a custom ROM, most of them already have this built in. You can check by executing the command "free" from just about any terminal emulator app. Look for the line starting with "swap." If you don't have virtual memory enabled, it will show 0. Otherwise the size of your VM swap file will be shown.
Hope this helps!