2 ms·
Fun thing I've had to do on Android. When the app does a really memory intensive task (client side video encoding in this case) we forked that process and trapp
by AnotherGoodName 3y ago
Fun thing I've had to do on Android. When the app does a really memory intensive task (client side video encoding in this case) we forked that process and trapped the sigsegv fault from the oom in the parent process and simply restarted after a sleep. It fixed a huge percentage of app deaths for us.
The reason this worked is that Android starts killing processes only after you pretty much run out of ram. So if you have a task that needs a lot of RAM even though the phone has it if it just closed a few apps you can't use that ram until after you've hit the allocation fault and let a bunch of apps die.