[Om2008.12] Adding swap space can stop app crashes

Nick Van Fossen stix213 at hotmail.com
Sat Jan 17 00:14:53 CET 2009

Just as a helpful note, adding swap space seems to help against application crashes.  I've always had issues with 
tangoGPS and the various webbrower apps crashing.  Looking into it a little more I notice that this was occurring when the 
puny 128MB of memory was getting filled up.  So, I added a swap file onto my microSD card and have had these problems 
practically clear up.  Anyone else had any similar experiences?  If this is a true fix this should probably go onto the wiki.  

So, I'm a bit lazy so instead of going through the trouble of adding a swap partition, I just created a swap file.  My microSD 
card is mounted at /media/nickcard so change the below accordingly.  I set mine up for 1GB, but that seems like way 
overkill, so here is a quick command list to create a 1/2GB swap.  

Create the swap file on the mounted microSD card (count is the number of megabytes, change accordingly):
dd if=/dev/zero of=/media/nickcard/swapfile.img bs=1024k count=512

Format the swap file:
mkswap /media/nickcard/swapfile.img

Add the swap file to your running system:
swapon /media/nickcard/swapfile.img

use "free -m" to verify that the swap is going

Now like I said I am lazy, so I didn't want to bother remembering how fstab worked so that it would auto-start that way, 
so I just added that last command to the startup.  I read that you would just add 
"/media/nickcard/swapfile.img none swap sw 0 0" to /etc/fstab but don't sue me if that part don't work.  :)


Windows Live™: Keep your life in sync. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/community/attachments/20090116/bb5d9950/attachment.htm 

More information about the community mailing list