Compare commits

..

No commits in common. "5edebbfffb33c45db3d1401cad304c681aa97cda" and "44e5796908253d8bf67af1430dc7a17fa8d4e59b" have entirely different histories.

View File

@ -361,12 +361,7 @@ void DiscardSystemPagesInternal(uintptr_t address, size_t length) {
// performance benefits unclear.
//
// Therefore, we just do the simple thing: MADV_DONTNEED.
int ret = madvise(ptr, length, MADV_DONTNEED);
if (ret && errno == ENOSYS) {
// Ignores when the kernel is built without CONFIG_ADVISE_SYSCALLS
return;
}
PA_PCHECK(ret == 0);
PA_PCHECK(0 == madvise(ptr, length, MADV_DONTNEED));
#endif
}