diff --git a/src/pages.c b/src/pages.c index 9561eb36..7ef3de75 100644 --- a/src/pages.c +++ b/src/pages.c @@ -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; }