3 ms·
Isn't MADV_FREE supposed to do that?
by zozbot234 5y ago
Isn't MADV_FREE supposed to do that?
- skywal_l 5y agoBut this is for mapped (or shared) memory. Not reserved memory I think. No suitable to the OP's purpose: have reserved "optional" memory you could use for caching.
- skywal_l 5y agoI Should have RTFM: "The MADV_FREE operation can be applied only to private anonymous pages (see mmap(2)). In Linux before version 4.12, when freeing pages on a swapless system, the pages in the given range are freed instantly, regardless of memory pressure."