> ...that allows the OS to notify applications of memory pressure or that allows the application to tell the OS that some allocations can be thrown out if need be.
There are mechanisms for both of these in up-to-date Linux - pressure stall information and volatile ranges, respectively.
MADV_FREE didn't work properly until fairly recently, though, because it behaved like Windows' MEM_RESET. AIUI MADV_FREE is not intended for ranges that you actually want to work with (i.e. you want to keep the data, not just the virtual addresses), but rather as an optimization for allocators.
There are mechanisms for both of these in up-to-date Linux - pressure stall information and volatile ranges, respectively.