Although `madvise(MADV_DONTNEED)` is Linux-specific, we can extend the use of the dummy page to the `mprotect()` approach which should be portable across all Unices.
Are you sure that all Unices will issue a memory barrier on all running threads of the process though?