Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@clacke >if there is a way for Linux to tell processes to please recover some RAM before it goes to OOM.
Yes, there is a signal that Linux can send to processes asking nicely to free() any unneeded cached memory, but it's really up to the software to implement a signal handler for that signal (via glibc, so it's a glibc or libc thing, although Linux does implement the sigaction and signal SYSCALLs) and free() some memory for memory pressure to be released.
Sure Android has that signal too, but I believe software handler libraries would implement such signal, as it's not like Java gives you any decent access to anything.