mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2025-02-17 15:33:18 +03:00
Compare commits
No commits in common. "5edebbfffb33c45db3d1401cad304c681aa97cda" and "44e5796908253d8bf67af1430dc7a17fa8d4e59b" have entirely different histories.
5edebbfffb
...
44e5796908
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user