MADV_DONTNEED on Linux actually mark the pages as free to be overwritten with zeroes, but on Darwin and BSD, it's just an advisory flag (the OS cannot discard the content). We should use MADV_FREE on Darwin and BSD.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/sanitizer_common/sanitizer_posix_libcdep.cc | ||
---|---|---|
65 ↗ | (On Diff #124986) | Please include SANITIZER_NETBSD too (and in the description). |
Comment Actions
Will this even build on Linux?
I don't see MADV_FREE in /usr/include
Maybe define SANITIZER_MADVISE_DONTNEED in lib/sanitizer_common/sanitizer_platform.h?