svn commit: r339654 - head/contrib/jemalloc/src
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue Oct 23 13:54:55 UTC 2018
Author: trasz
Date: Tue Oct 23 13:54:54 2018
New Revision: 339654
URL: https://svnweb.freebsd.org/changeset/base/339654
Log:
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
Modified:
head/contrib/jemalloc/src/pages.c
Modified: head/contrib/jemalloc/src/pages.c
==============================================================================
--- head/contrib/jemalloc/src/pages.c Tue Oct 23 13:49:53 2018 (r339653)
+++ head/contrib/jemalloc/src/pages.c Tue Oct 23 13:54:54 2018 (r339654)
@@ -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;
}
More information about the svn-src-head
mailing list