Disable runtime detection of lazy purging support on FreeBSD.
The check doesn't seem to serve any purpose here, and this shaves off three syscalls on binary startup.
This commit is contained in:
parent
115ce93562
commit
676cdd6679
@ -586,6 +586,11 @@ pages_boot(void) {
|
|||||||
|
|
||||||
init_thp_state();
|
init_thp_state();
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
/*
|
||||||
|
* FreeBSD doesn't need the check; madvise(2) is known to work.
|
||||||
|
*/
|
||||||
|
#else
|
||||||
/* Detect lazy purge runtime support. */
|
/* Detect lazy purge runtime support. */
|
||||||
if (pages_can_purge_lazy) {
|
if (pages_can_purge_lazy) {
|
||||||
bool committed = false;
|
bool committed = false;
|
||||||
@ -599,6 +604,7 @@ pages_boot(void) {
|
|||||||
}
|
}
|
||||||
os_pages_unmap(madv_free_page, PAGE);
|
os_pages_unmap(madv_free_page, PAGE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user