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:
Edward Tomasz Napierala 2018-06-23 05:44:23 +01:00 committed by David Goldblatt
parent 115ce93562
commit 676cdd6679

View File

@ -586,6 +586,11 @@ pages_boot(void) {
init_thp_state();
#ifdef __FreeBSD__
/*
* FreeBSD doesn't need the check; madvise(2) is known to work.
*/
#else
/* Detect lazy purge runtime support. */
if (pages_can_purge_lazy) {
bool committed = false;
@ -599,6 +604,7 @@ pages_boot(void) {
}
os_pages_unmap(madv_free_page, PAGE);
}
#endif
return false;
}