Keeping an app in memory I once read about an init.d tweak to keep an app in memory. I'm unable to find that tweak now. Does anyone have the link? An alternate method would also be welcome.

Edit : I'm using cyanogenmod 10.
You can do it according to this post on XDA:


  
  Make a file called 99applock.txt
  Insert code below and put you messaging service in where it says PPID (that usually can be found in data/data if your using
  aftermakrket sms app) remove the .txt extension and put file in
  ect/init.d and just give it 777 permissions, it works for me.
  


    #!/system/bin/sh

    sleep 60

    PPID=$(pidof com.your.app)
    echo "-17" &gt; /proc/$PPID/oom_adj
    renice -18 $PPID