mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
Compare commits
3 Commits
44e5796908
...
5edebbfffb
Author | SHA1 | Date | |
---|---|---|---|
|
5edebbfffb | ||
|
f9f98eedd9 | ||
|
15fe90088c |
@ -361,7 +361,12 @@ void DiscardSystemPagesInternal(uintptr_t address, size_t length) {
|
|||||||
// performance benefits unclear.
|
// performance benefits unclear.
|
||||||
//
|
//
|
||||||
// Therefore, we just do the simple thing: MADV_DONTNEED.
|
// Therefore, we just do the simple thing: MADV_DONTNEED.
|
||||||
PA_PCHECK(0 == madvise(ptr, length, 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);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user