by jbert · 11y ago · 0 comments
I disagree. A process could usefully cache the results of computation in RAM (e.g. a large lookup table). This RAM is useful to the process (will increase performance) but if it is discarded due to a spike in memory pressure it could be rebuilt.
> What happens when the kernel yanks a page of memory from über a running process?
There is a madvise() flag for this, MADV_DONTNEED - http://man7.org/linux/man-pages/man2/madvise.2.html
You get zero pages. Which is fine - you can detect that with a canary value and then you know you need to rebuild your cache.
No comments yet.