diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2018-10-23 13:54:54 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2018-10-23 13:54:54 +0000 |
commit | bff19560ee234a58064ae6bc4645d29d9e02e5a5 (patch) | |
tree | 255fd7f6234abf632ebec367030409f6afebb9b1 /contrib/jemalloc | |
parent | 5d704fafcbe60a52dc0e741a28e1b5219ad24337 (diff) | |
download | src-bff19560ee234a58064ae6bc4645d29d9e02e5a5.tar.gz src-bff19560ee234a58064ae6bc4645d29d9e02e5a5.zip |
Pick 676cdd66792ccb629a978837ea2a066d5db342cc from upstream:
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.
Discussed by: jasone
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Notes
Notes:
svn path=/head/; revision=339654
Diffstat (limited to 'contrib/jemalloc')
-rw-r--r-- | contrib/jemalloc/src/pages.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/jemalloc/src/pages.c b/contrib/jemalloc/src/pages.c index 26002692d600..8acebd1b818b 100644 --- a/contrib/jemalloc/src/pages.c +++ b/contrib/jemalloc/src/pages.c @@ -588,6 +588,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; @@ -601,6 +606,7 @@ pages_boot(void) { } os_pages_unmap(madv_free_page, PAGE); } +#endif return false; } |