From 854854091c98db93f135751c84acccc72fca1350 Mon Sep 17 00:00:00 2001 From: jasone Date: Thu, 23 Jan 2014 02:47:36 +0000 Subject: Update jemalloc to version 3.5.0. --- contrib/jemalloc/FREEBSD-diffs | 99 +++++++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 40 deletions(-) (limited to 'contrib/jemalloc/FREEBSD-diffs') diff --git a/contrib/jemalloc/FREEBSD-diffs b/contrib/jemalloc/FREEBSD-diffs index ac22cf5..e621af7 100644 --- a/contrib/jemalloc/FREEBSD-diffs +++ b/contrib/jemalloc/FREEBSD-diffs @@ -1,8 +1,8 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index abd5e6f..1d7491a 100644 +index c7e2e87..2bd59f0 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in -@@ -51,12 +51,23 @@ +@@ -57,12 +57,23 @@ This manual describes jemalloc @jemalloc_version@. More information can be found at the jemalloc website. @@ -27,7 +27,7 @@ index abd5e6f..1d7491a 100644 Standard API -@@ -2180,4 +2191,16 @@ malloc_conf = "lg_chunk:24";]]> +@@ -2338,4 +2349,19 @@ malloc_conf = "lg_chunk:24";]]> The posix_memalign function conforms to IEEE Std 1003.1-2001 (“POSIX.1”). @@ -42,32 +42,35 @@ index abd5e6f..1d7491a 100644 + mallctl*, and + *allocm functions first appeared in + FreeBSD 10.0. ++ ++ The *allocx functions first appeared ++ in FreeBSD 11.0. + diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in -index 53c135c..c547339 100644 +index d24a1fe..d101c3d 100644 --- a/include/jemalloc/internal/jemalloc_internal.h.in +++ b/include/jemalloc/internal/jemalloc_internal.h.in @@ -1,5 +1,8 @@ #ifndef JEMALLOC_INTERNAL_H - #define JEMALLOC_INTERNAL_H + #define JEMALLOC_INTERNAL_H +#include "libc_private.h" +#include "namespace.h" + #include #ifdef _WIN32 # include -@@ -54,6 +57,9 @@ typedef intptr_t ssize_t; +@@ -65,6 +68,9 @@ typedef intptr_t ssize_t; + #include #endif - #include +#include "un-namespace.h" +#include "libc_private.h" + #define JEMALLOC_NO_DEMANGLE - #include "../jemalloc@install_suffix@.h" - -@@ -95,13 +101,7 @@ static const bool config_fill = + #ifdef JEMALLOC_JET + # define JEMALLOC_N(n) jet_##n +@@ -99,13 +105,7 @@ static const bool config_fill = false #endif ; @@ -96,36 +99,24 @@ index de44e14..564d604 100644 #endif bool malloc_mutex_init(malloc_mutex_t *mutex); -diff --git a/include/jemalloc/internal/private_namespace.h b/include/jemalloc/internal/private_namespace.h -index cdb0b0e..2a98d1f 100644 ---- a/include/jemalloc/internal/private_namespace.h -+++ b/include/jemalloc/internal/private_namespace.h -@@ -218,7 +218,6 @@ - #define iralloc JEMALLOC_N(iralloc) - #define irallocx JEMALLOC_N(irallocx) - #define isalloc JEMALLOC_N(isalloc) --#define isthreaded JEMALLOC_N(isthreaded) - #define ivsalloc JEMALLOC_N(ivsalloc) - #define jemalloc_postfork_child JEMALLOC_N(jemalloc_postfork_child) - #define jemalloc_postfork_parent JEMALLOC_N(jemalloc_postfork_parent) -diff --git a/include/jemalloc/jemalloc.h.in b/include/jemalloc/jemalloc.h.in -index 31b1304..c3ef2f5 100644 ---- a/include/jemalloc/jemalloc.h.in -+++ b/include/jemalloc/jemalloc.h.in -@@ -15,6 +15,7 @@ extern "C" { - #define JEMALLOC_VERSION_GID "@jemalloc_version_gid@" - - #include "jemalloc_defs@install_suffix@.h" -+#include "jemalloc_FreeBSD.h" - - #ifdef JEMALLOC_EXPERIMENTAL - #define ALLOCM_LG_ALIGN(la) (la) +diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt +index 1e64ed5..29ddba3 100644 +--- a/include/jemalloc/internal/private_symbols.txt ++++ b/include/jemalloc/internal/private_symbols.txt +@@ -225,7 +225,6 @@ iralloc + iralloct + iralloct_realign + isalloc +-isthreaded + ivsalloc + ixalloc + jemalloc_postfork_child diff --git a/include/jemalloc/jemalloc_FreeBSD.h b/include/jemalloc/jemalloc_FreeBSD.h new file mode 100644 -index 0000000..e6c8407 +index 0000000..94554bc --- /dev/null +++ b/include/jemalloc/jemalloc_FreeBSD.h -@@ -0,0 +1,117 @@ +@@ -0,0 +1,134 @@ +/* + * Override settings that were generated in jemalloc_defs.h as necessary. + */ @@ -202,6 +193,12 @@ index 0000000..e6c8407 +#undef je_free +#undef je_posix_memalign +#undef je_malloc_usable_size ++#undef je_mallocx ++#undef je_rallocx ++#undef je_xallocx ++#undef je_sallocx ++#undef je_dallocx ++#undef je_nallocx +#undef je_allocm +#undef je_rallocm +#undef je_sallocm @@ -213,6 +210,12 @@ index 0000000..e6c8407 +#define je_free __free +#define je_posix_memalign __posix_memalign +#define je_malloc_usable_size __malloc_usable_size ++#define je_mallocx __mallocx ++#define je_rallocx __rallocx ++#define je_xallocx __xallocx ++#define je_sallocx __sallocx ++#define je_dallocx __dallocx ++#define je_nallocx __nallocx +#define je_allocm __allocm +#define je_rallocm __rallocm +#define je_sallocm __sallocm @@ -236,15 +239,31 @@ index 0000000..e6c8407 +__weak_reference(__free, free); +__weak_reference(__posix_memalign, posix_memalign); +__weak_reference(__malloc_usable_size, malloc_usable_size); ++__weak_reference(__mallocx, mallocx); ++__weak_reference(__rallocx, rallocx); ++__weak_reference(__xallocx, xallocx); ++__weak_reference(__sallocx, sallocx); ++__weak_reference(__dallocx, dallocx); ++__weak_reference(__nallocx, nallocx); +__weak_reference(__allocm, allocm); +__weak_reference(__rallocm, rallocm); +__weak_reference(__sallocm, sallocm); +__weak_reference(__dallocm, dallocm); +__weak_reference(__nallocm, nallocm); +#endif +diff --git a/include/jemalloc/jemalloc_rename.sh b/include/jemalloc/jemalloc_rename.sh +index f943891..47d032c 100755 +--- a/include/jemalloc/jemalloc_rename.sh ++++ b/include/jemalloc/jemalloc_rename.sh +@@ -19,4 +19,6 @@ done + + cat <