mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
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
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue