[maemo-developers] Hibernation of applications during ptrace
From: Philip Van Hoof spam at pvanhoof.beDate: Tue Sep 25 19:33:24 EEST 2007
- Previous message: Hibernation of applications during ptrace
- Next message: Hibernation of applications during ptrace
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, 2007-09-25 at 19:23 +0300, Eero Tamminen wrote: > Hi, > Desktop kills only applications that have announced themselves to be > killable. Application should do that only when they've saved state, > are in the background (i.e. not interacting with the user) and able > to restore the state when restarted. I.e. it would be a problem in > the application I think. Interesting, how would this work? I don't think our application is ever setting itself in this state, so I wonder why this hibernation key is created? :-\ > And desktop does this only when it's notified that the device is low > on memory. So, close extra applications and if that doesn't help, > add swap. You might also try using gdbserver as Gdb can take quite > a lot of memory. This also happens in Scratchbox running on a desktop with 2GB of ram. Using gdbserver is something I can try, yes. Measuring memory availability shows me that around 20MB is still available when testing this on a device. > Another alternative is that the device runs so low on memory that > your application is OOM-killed. You can see this from the syslog. Checked. This ain't happening. Thanks for the hint, though. > In this case add swap or use gdbserver. If you know that the device > should still survive with the amount of memory Gdb and your app > are using, you could set those processes OOM-protected with: > echo -17 > /proc/PID/oom_adj Aha, also very useful indeed. > And OOM-unprotect it afterwards by using "0" instead of -17 (as root > of course), but don't be surprised if the device reboots if they > use too much memory. :-) I wont :) Thanks for the interesting info. Although I think it doesn't yet explain the ptrace problem that I experience :-( -- Philip Van Hoof, software developer home: me at pvanhoof dot be gnome: pvanhoof at gnome dot org http://www.pvanhoof.be/blog
- Previous message: Hibernation of applications during ptrace
- Next message: Hibernation of applications during ptrace
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]