Skip to content

Commit

Permalink
Update to jemalloc 2.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jbergstroem committed Nov 23, 2011
1 parent 3c95e72 commit 1d03c1c
Show file tree
Hide file tree
Showing 24 changed files with 535 additions and 202 deletions.
37 changes: 37 additions & 0 deletions deps/jemalloc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,43 @@ found in the git revision history:
http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git
git://canonware.com/jemalloc.git

* 2.2.5 (November 14, 2011)

Bug fixes:
- Fix huge_ralloc() race when using mremap(2). This is a serious bug that
could cause memory corruption and/or crashes.
- Fix huge_ralloc() to maintain chunk statistics.
- Fix malloc_stats_print(..., "a") output.

* 2.2.4 (November 5, 2011)

Bug fixes:
- Initialize arenas_tsd before using it. This bug existed for 2.2.[0-3], as
well as for --disable-tls builds in earlier releases.
- Do not assume a 4 KiB page size in test/rallocm.c.

* 2.2.3 (August 31, 2011)

This version fixes numerous bugs related to heap profiling.

Bug fixes:
- Fix a prof-related race condition. This bug could cause memory corruption,
but only occurred in non-default configurations (prof_accum:false).
- Fix off-by-one backtracing issues (make sure that prof_alloc_prep() is
excluded from backtraces).
- Fix a prof-related bug in realloc() (only triggered by OOM errors).
- Fix prof-related bugs in allocm() and rallocm().
- Fix prof_tdata_cleanup() for --disable-tls builds.
- Fix a relative include path, to fix objdir builds.

* 2.2.2 (July 30, 2011)

Bug fixes:
- Fix a build error for --disable-tcache.
- Fix assertions in arena_purge() (for real this time).
- Add the --with-private-namespace option. This is a workaround for symbol
conflicts that can inadvertently arise when using static libraries.

* 2.2.1 (March 30, 2011)

Bug fixes:
Expand Down
6 changes: 6 additions & 0 deletions deps/jemalloc/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ any of the following arguments (not a definitive list) to 'configure':
jemalloc overlays the default malloc zone, but makes no attempt to actually
replace the "malloc", "calloc", etc. symbols.

--with-private-namespace=<prefix>
Prefix all library-private APIs with <prefix>. For shared libraries,
symbol visibility mechanisms prevent these symbols from being exported, but
for static libraries, naming collisions are a real possibility. By
default, the prefix is "" (empty string).

--with-install-suffix=<suffix>
Append <suffix> to the base name of all installed files, such that multiple
versions of jemalloc can coexist in the same installation directory. For
Expand Down
4 changes: 2 additions & 2 deletions deps/jemalloc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ doc: $(DOCS)
@objroot@lib/libjemalloc@install_suffix@.$(SO)
@mkdir -p $(@D)
ifneq (@RPATH@, )
$(CC) -o $@ $< @RPATH@@objroot@lib -L@objroot@lib -ljemalloc@install_suffix@
$(CC) -o $@ $< @RPATH@@objroot@lib -L@objroot@lib -ljemalloc@install_suffix@ -lpthread
else
$(CC) -o $@ $< -L@objroot@lib -ljemalloc@install_suffix@
$(CC) -o $@ $< -L@objroot@lib -ljemalloc@install_suffix@ -lpthread
endif

install_bin:
Expand Down
2 changes: 1 addition & 1 deletion deps/jemalloc/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.1-0-g5ef7abf6d846720fb3fb8c737861c99b5ad1d862
2.2.5-0-gfc1bb70e5f0d9a58b39efa39cc549b5af5104760
38 changes: 32 additions & 6 deletions deps/jemalloc/configure
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,6 @@ enable_prof
enable_stats
enable_debug
install_suffix
jemalloc_cprefix
jemalloc_prefix
AUTOCONF
LD
AR
Expand Down Expand Up @@ -705,6 +703,7 @@ with_xslroot
with_rpath
enable_autogen
with_jemalloc_prefix
with_private_namespace
with_install_suffix
enable_cc_silence
enable_debug
Expand Down Expand Up @@ -1375,6 +1374,8 @@ Optional Packages:
--with-rpath=<rpath> Colon-separated rpath (ELF systems only)
--with-jemalloc-prefix=<prefix>
Prefix to prepend to all public APIs
--with-private-namespace=<prefix>
Prefix to prepend to all library-private APIs
--with-install-suffix=<suffix>
Suffix to append to all installed files
--with-static-libunwind=<libunwind.a>
Expand Down Expand Up @@ -4800,12 +4801,33 @@ _ACEOF
#define JEMALLOC_CPREFIX "$JEMALLOC_CPREFIX"
_ACEOF
jemalloc_prefix="$JEMALLOC_PREFIX"
jemalloc_cprefix="$JEMALLOC_CPREFIX"
cat >>confdefs.h <<_ACEOF
#define JEMALLOC_P(string_that_no_one_should_want_to_use_as_a_jemalloc_API_prefix) ${JEMALLOC_PREFIX}##string_that_no_one_should_want_to_use_as_a_jemalloc_API_prefix
_ACEOF
fi
# Check whether --with-private_namespace was given.
if test "${with_private_namespace+set}" = set; then :
withval=$with_private_namespace; JEMALLOC_PRIVATE_NAMESPACE="$with_private_namespace"
else
JEMALLOC_PRIVATE_NAMESPACE=""
fi
cat >>confdefs.h <<_ACEOF
#define JEMALLOC_PRIVATE_NAMESPACE "$JEMALLOC_PRIVATE_NAMESPACE"
_ACEOF
if test "x$JEMALLOC_PRIVATE_NAMESPACE" != "x" ; then
cat >>confdefs.h <<_ACEOF
#define JEMALLOC_P(string_that_no_one_should_want_to_use_as_a_jemalloc_API_prefix) ${JEMALLOC_PREFIX}##string_that_no_one_should_want_to_use_as_a_jemalloc_API_prefix
#define JEMALLOC_N(string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix) ${JEMALLOC_PRIVATE_NAMESPACE}##string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define JEMALLOC_N(string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix) string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix
_ACEOF
fi
Expand Down Expand Up @@ -5508,7 +5530,7 @@ fi
if test -d "${srcroot}../.git" ; then
if test -d "${srcroot}.git" ; then
git describe --long --abbrev=40 > ${srcroot}VERSION
fi
jemalloc_version=`cat ${srcroot}VERSION`
Expand Down Expand Up @@ -7346,6 +7368,10 @@ $as_echo "abs_objroot : ${abs_objroot}" >&6; }
$as_echo "" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: JEMALLOC_PREFIX : ${JEMALLOC_PREFIX}" >&5
$as_echo "JEMALLOC_PREFIX : ${JEMALLOC_PREFIX}" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: JEMALLOC_PRIVATE_NAMESPACE" >&5
$as_echo "JEMALLOC_PRIVATE_NAMESPACE" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: : ${JEMALLOC_PRIVATE_NAMESPACE}" >&5
$as_echo " : ${JEMALLOC_PRIVATE_NAMESPACE}" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: install_suffix : ${install_suffix}" >&5
$as_echo "install_suffix : ${install_suffix}" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: autogen : ${enable_autogen}" >&5
Expand Down
21 changes: 16 additions & 5 deletions deps/jemalloc/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,22 @@ if test "x$JEMALLOC_PREFIX" != "x" ; then
JEMALLOC_CPREFIX=`echo ${JEMALLOC_PREFIX} | tr "a-z" "A-Z"`
AC_DEFINE_UNQUOTED([JEMALLOC_PREFIX], ["$JEMALLOC_PREFIX"])
AC_DEFINE_UNQUOTED([JEMALLOC_CPREFIX], ["$JEMALLOC_CPREFIX"])
jemalloc_prefix="$JEMALLOC_PREFIX"
jemalloc_cprefix="$JEMALLOC_CPREFIX"
AC_SUBST([jemalloc_prefix])
AC_SUBST([jemalloc_cprefix])
AC_DEFINE_UNQUOTED([JEMALLOC_P(string_that_no_one_should_want_to_use_as_a_jemalloc_API_prefix)], [${JEMALLOC_PREFIX}##string_that_no_one_should_want_to_use_as_a_jemalloc_API_prefix])
fi

dnl Do not mangle library-private APIs by default.
AC_ARG_WITH([private_namespace],
[AS_HELP_STRING([--with-private-namespace=<prefix>], [Prefix to prepend to all library-private APIs])],
[JEMALLOC_PRIVATE_NAMESPACE="$with_private_namespace"],
[JEMALLOC_PRIVATE_NAMESPACE=""]
)
AC_DEFINE_UNQUOTED([JEMALLOC_PRIVATE_NAMESPACE], ["$JEMALLOC_PRIVATE_NAMESPACE"])
if test "x$JEMALLOC_PRIVATE_NAMESPACE" != "x" ; then
AC_DEFINE_UNQUOTED([JEMALLOC_N(string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix)], [${JEMALLOC_PRIVATE_NAMESPACE}##string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix])
else
AC_DEFINE_UNQUOTED([JEMALLOC_N(string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix)], [string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix])
fi

dnl Do not add suffix to installed files by default.
AC_ARG_WITH([install_suffix],
[AS_HELP_STRING([--with-install-suffix=<suffix>], [Suffix to append to all installed files])],
Expand Down Expand Up @@ -688,7 +697,7 @@ dnl jemalloc configuration.
dnl

dnl Set VERSION if source directory has an embedded git repository.
if test -d "${srcroot}../.git" ; then
if test -d "${srcroot}.git" ; then
git describe --long --abbrev=40 > ${srcroot}VERSION
fi
jemalloc_version=`cat ${srcroot}VERSION`
Expand Down Expand Up @@ -905,6 +914,8 @@ AC_MSG_RESULT([objroot : ${objroot}])
AC_MSG_RESULT([abs_objroot : ${abs_objroot}])
AC_MSG_RESULT([])
AC_MSG_RESULT([JEMALLOC_PREFIX : ${JEMALLOC_PREFIX}])
AC_MSG_RESULT([JEMALLOC_PRIVATE_NAMESPACE])
AC_MSG_RESULT([ : ${JEMALLOC_PRIVATE_NAMESPACE}])
AC_MSG_RESULT([install_suffix : ${install_suffix}])
AC_MSG_RESULT([autogen : ${enable_autogen}])
AC_MSG_RESULT([cc-silence : ${enable_cc_silence}])
Expand Down
10 changes: 5 additions & 5 deletions deps/jemalloc/doc/jemalloc.3
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: JEMALLOC
.\" Author: Jason Evans
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 03/30/2011
.\" Date: 11/14/2011
.\" Manual: User Manual
.\" Source: jemalloc 2.2.1-0-g5ef7abf6d846720fb3fb8c737861c99b5ad1d862
.\" Source: jemalloc 2.2.5-0-gfc1bb70e5f0d9a58b39efa39cc549b5af5104760
.\" Language: English
.\"
.TH "JEMALLOC" "3" "03/30/2011" "jemalloc 2.2.1-0-g5ef7abf6d846" "User Manual"
.TH "JEMALLOC" "3" "11/14/2011" "jemalloc 2.2.5-0-gfc1bb70e5f0d" "User Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand All @@ -31,7 +31,7 @@
jemalloc \- general purpose memory allocation functions
.SH "LIBRARY"
.PP
This manual describes jemalloc 2\&.2\&.1\-0\-g5ef7abf6d846720fb3fb8c737861c99b5ad1d862\&. More information can be found at the
This manual describes jemalloc 2\&.2\&.5\-0\-gfc1bb70e5f0d9a58b39efa39cc549b5af5104760\&. More information can be found at the
\m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&.
.SH "SYNOPSIS"
.sp
Expand Down Expand Up @@ -1215,7 +1215,7 @@ is successfully written to\&.
Number of file descriptors in use for swap\&.
.RE
.PP
"swap\&.fds" (\fBint *\fR) r\- [\fB\-\-enable\-swap\fR]
"swap\&.fds" (\fBint *\fR) rw [\fB\-\-enable\-swap\fR]
.RS 4
When written to, the files associated with the specified file descriptors are contiguously mapped via
\fBmmap\fR(2)\&. The resulting virtual memory region is preferred over anonymous
Expand Down
Loading

0 comments on commit 1d03c1c

Please sign in to comment.