# [Q]Does Android support Swap?



## krnlpanic (Nov 25, 2011)

Hello everyone.
I am quite new to ROM development and rather rusty in my Linux skills
however I am completely captivated by the Android operating system
and am eager to delve into this with everything I've got.

Since Android is Linux based and supports init.d I was wondering
if anyone knows if your sdcard contained a swap partition would
the Android system be able to mount it and utilize it and, more so,
still be able to utilize the rest of the card?

I am going to attempt to add this feature in my ROM but if someone
already knows it isn't possible, I can bypass that idea and continue
moving forward with other ideas.

Many thanks in advance everyone!


----------



## kendon (Jan 11, 2012)

first of all, the init.d support as found in custom roms is a little different from that found in linux, afaik. it is just a "busybox run-parts" command run during startup, called from init.rc in the bootimage.

swap was used in former times, i don't think anyone uses it anymore as it is not really needed. current devices have more than enough memory. that being said, it still should work if you create a second partition behind the fat partition on the sdcard, then activate it via swapon or something.

any particular need you have for swap?


----------



## MR H3LLMAN (Oct 20, 2011)

Someone please feel free to correct me if I am wrong, as its highly possible, but isn't ZRAM dependant upon swap? That being said I do believe it is something that has to be enabled and built at kernel level.


----------

