Add a test for madvise(DONTNEED).

Hypothesis for #544.