Deleted Added
full compact
FREEBSD-diffs (286911) FREEBSD-diffs (288090)
1diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in
2index 8fc774b..fdbef95 100644
3--- a/doc/jemalloc.xml.in
4+++ b/doc/jemalloc.xml.in
5@@ -53,11 +53,23 @@
6 <para>This manual describes jemalloc @jemalloc_version@. More information
7 can be found at the <ulink
8 url="http://www.canonware.com/jemalloc/">jemalloc website</ulink>.</para>

--- 33 unchanged lines hidden (view full) ---

42+ <function>mallctl*<parameter/></function> functions first appeared in
43+ FreeBSD 10.0.</para>
44+
45+ <para>The <function>*allocx<parameter/></function> functions first appeared
46+ in FreeBSD 11.0.</para>
47+ </refsect1>
48 </refentry>
49diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
1diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in
2index 8fc774b..fdbef95 100644
3--- a/doc/jemalloc.xml.in
4+++ b/doc/jemalloc.xml.in
5@@ -53,11 +53,23 @@
6 <para>This manual describes jemalloc @jemalloc_version@. More information
7 can be found at the <ulink
8 url="http://www.canonware.com/jemalloc/">jemalloc website</ulink>.</para>

--- 33 unchanged lines hidden (view full) ---

42+ <function>mallctl*<parameter/></function> functions first appeared in
43+ FreeBSD 10.0.</para>
44+
45+ <para>The <function>*allocx<parameter/></function> functions first appeared
46+ in FreeBSD 11.0.</para>
47+ </refsect1>
48 </refentry>
49diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
50index 7a137b6..b0001e9 100644
50index 8536a3e..0c2a81f 100644
51--- a/include/jemalloc/internal/jemalloc_internal.h.in
52+++ b/include/jemalloc/internal/jemalloc_internal.h.in
53@@ -8,6 +8,9 @@
54 #include <sys/ktrace.h>
55 #endif
56
57+#include "un-namespace.h"
58+#include "libc_private.h"

--- 47 unchanged lines hidden (view full) ---

106 void malloc_mutex_prefork(malloc_mutex_t *mutex);
107 void malloc_mutex_postfork_parent(malloc_mutex_t *mutex);
108 void malloc_mutex_postfork_child(malloc_mutex_t *mutex);
109+bool malloc_mutex_first_thread(void);
110 bool mutex_boot(void);
111
112 #endif /* JEMALLOC_H_EXTERNS */
113diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt
51--- a/include/jemalloc/internal/jemalloc_internal.h.in
52+++ b/include/jemalloc/internal/jemalloc_internal.h.in
53@@ -8,6 +8,9 @@
54 #include <sys/ktrace.h>
55 #endif
56
57+#include "un-namespace.h"
58+#include "libc_private.h"

--- 47 unchanged lines hidden (view full) ---

106 void malloc_mutex_prefork(malloc_mutex_t *mutex);
107 void malloc_mutex_postfork_parent(malloc_mutex_t *mutex);
108 void malloc_mutex_postfork_child(malloc_mutex_t *mutex);
109+bool malloc_mutex_first_thread(void);
110 bool mutex_boot(void);
111
112 #endif /* JEMALLOC_H_EXTERNS */
113diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt
114index dbf6aa7..f87dba8 100644
114index a90021a..34904bf 100644
115--- a/include/jemalloc/internal/private_symbols.txt
116+++ b/include/jemalloc/internal/private_symbols.txt
115--- a/include/jemalloc/internal/private_symbols.txt
116+++ b/include/jemalloc/internal/private_symbols.txt
117@@ -277,7 +277,6 @@ iralloct_realign
117@@ -280,7 +280,6 @@ iralloct_realign
118 isalloc
119 isdalloct
120 isqalloc
121-isthreaded
122 ivsalloc
123 ixalloc
124 jemalloc_postfork_child
125diff --git a/include/jemalloc/jemalloc_FreeBSD.h b/include/jemalloc/jemalloc_FreeBSD.h

--- 151 unchanged lines hidden (view full) ---

277@@ -19,4 +19,6 @@ done
278
279 cat <<EOF
280 #endif
281+
282+#include "jemalloc_FreeBSD.h"
283 EOF
284diff --git a/src/jemalloc.c b/src/jemalloc.c
118 isalloc
119 isdalloct
120 isqalloc
121-isthreaded
122 ivsalloc
123 ixalloc
124 jemalloc_postfork_child
125diff --git a/include/jemalloc/jemalloc_FreeBSD.h b/include/jemalloc/jemalloc_FreeBSD.h

--- 151 unchanged lines hidden (view full) ---

277@@ -19,4 +19,6 @@ done
278
279 cat <<EOF
280 #endif
281+
282+#include "jemalloc_FreeBSD.h"
283 EOF
284diff --git a/src/jemalloc.c b/src/jemalloc.c
285index ed7863b..d078a1f 100644
285index 5a2d324..b6cbb79 100644
286--- a/src/jemalloc.c
287+++ b/src/jemalloc.c
288@@ -4,6 +4,10 @@
289 /******************************************************************************/
290 /* Data. */
291
292+/* Work around <http://llvm.org/bugs/show_bug.cgi?id=12623>: */
293+const char *__malloc_options_1_0 = NULL;
294+__sym_compat(_malloc_options, __malloc_options_1_0, FBSD_1.0);
295+
296 /* Runtime configuration options. */
297 const char *je_malloc_conf JEMALLOC_ATTR(weak);
298 bool opt_abort =
286--- a/src/jemalloc.c
287+++ b/src/jemalloc.c
288@@ -4,6 +4,10 @@
289 /******************************************************************************/
290 /* Data. */
291
292+/* Work around <http://llvm.org/bugs/show_bug.cgi?id=12623>: */
293+const char *__malloc_options_1_0 = NULL;
294+__sym_compat(_malloc_options, __malloc_options_1_0, FBSD_1.0);
295+
296 /* Runtime configuration options. */
297 const char *je_malloc_conf JEMALLOC_ATTR(weak);
298 bool opt_abort =
299@@ -2475,6 +2479,107 @@ je_malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void *ptr)
299@@ -2490,6 +2494,107 @@ je_malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void *ptr)
300 */
301 /******************************************************************************/
302 /*
303+ * Begin compatibility functions.
304+ */
305+
306+#define ALLOCM_LG_ALIGN(la) (la)
307+#define ALLOCM_ALIGN(a) (ffsl(a)-1)

--- 91 unchanged lines hidden (view full) ---

399+/*
400+ * End compatibility functions.
401+ */
402+/******************************************************************************/
403+/*
404 * The following functions are used by threading libraries for protection of
405 * malloc during fork().
406 */
300 */
301 /******************************************************************************/
302 /*
303+ * Begin compatibility functions.
304+ */
305+
306+#define ALLOCM_LG_ALIGN(la) (la)
307+#define ALLOCM_ALIGN(a) (ffsl(a)-1)

--- 91 unchanged lines hidden (view full) ---

399+/*
400+ * End compatibility functions.
401+ */
402+/******************************************************************************/
403+/*
404 * The following functions are used by threading libraries for protection of
405 * malloc during fork().
406 */
407@@ -2575,4 +2680,11 @@ jemalloc_postfork_child(void)
407@@ -2590,4 +2695,11 @@ jemalloc_postfork_child(void)
408 ctl_postfork_child();
409 }
410
411+void
412+_malloc_first_thread(void)
413+{
414+
415+ (void)malloc_mutex_first_thread();

--- 76 unchanged lines hidden ---
408 ctl_postfork_child();
409 }
410
411+void
412+_malloc_first_thread(void)
413+{
414+
415+ (void)malloc_mutex_first_thread();

--- 76 unchanged lines hidden ---