Skip to content

Commit 8019f4c

Browse files
committed
Merge branch 'rel-4.3.0'
2 parents 3de0353 + cb3ad65 commit 8019f4c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2663
-1374
lines changed

.appveyor.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: '{build}'
2+
3+
environment:
4+
matrix:
5+
- MSYSTEM: MINGW64
6+
CPU: x86_64
7+
MSVC: amd64
8+
- MSYSTEM: MINGW32
9+
CPU: i686
10+
MSVC: x86
11+
- MSYSTEM: MINGW64
12+
CPU: x86_64
13+
- MSYSTEM: MINGW32
14+
CPU: i686
15+
16+
install:
17+
- set PATH=c:\msys64\%MSYSTEM%\bin;c:\msys64\usr\bin;%PATH%
18+
- if defined MSVC call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %MSVC%
19+
- if defined MSVC pacman --noconfirm -Rsc mingw-w64-%CPU%-gcc gcc
20+
- pacman --noconfirm -Suy mingw-w64-%CPU%-make
21+
22+
build_script:
23+
- bash -c "autoconf"
24+
- bash -c "./configure"
25+
- mingw32-make -j3
26+
- file lib/jemalloc.dll
27+
- mingw32-make -j3 tests
28+
- mingw32-make -k check

.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: c
2+
3+
matrix:
4+
include:
5+
- os: linux
6+
compiler: gcc
7+
- os: linux
8+
compiler: gcc
9+
env:
10+
- EXTRA_FLAGS=-m32
11+
addons:
12+
apt:
13+
packages:
14+
- gcc-multilib
15+
- os: osx
16+
compiler: clang
17+
- os: osx
18+
compiler: clang
19+
env:
20+
- EXTRA_FLAGS=-m32
21+
22+
before_script:
23+
- autoconf
24+
- ./configure${EXTRA_FLAGS:+ CC="$CC $EXTRA_FLAGS"}
25+
- make -j3
26+
- make -j3 tests
27+
28+
script:
29+
- make check

ChangeLog

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,49 @@ brevity. Much more detail can be found in the git revision history:
44

55
https://github.com/jemalloc/jemalloc
66

7+
* 4.3.0 (November 4, 2016)
8+
9+
This is the first release that passes the test suite for multiple Windows
10+
configurations, thanks in large part to @glandium setting up continuous
11+
integration via AppVeyor (and Travis CI for Linux and OS X).
12+
13+
New features:
14+
- Add "J" (JSON) support to malloc_stats_print(). (@jasone)
15+
- Add Cray compiler support. (@ronawho)
16+
17+
Optimizations:
18+
- Add/use adaptive spinning for bootstrapping and radix tree node
19+
initialization. (@jasone)
20+
21+
Bug fixes:
22+
- Fix large allocation to search starting in the optimal size class heap,
23+
which can substantially reduce virtual memory churn and fragmentation. This
24+
regression was first released in 4.0.0. (@mjp41, @jasone)
25+
- Fix stats.arenas.<i>.nthreads accounting. (@interwq)
26+
- Fix and simplify decay-based purging. (@jasone)
27+
- Make DSS (sbrk(2)-related) operations lockless, which resolves potential
28+
deadlocks during thread exit. (@jasone)
29+
- Fix over-sized allocation of radix tree leaf nodes. (@mjp41, @ogaun,
30+
@jasone)
31+
- Fix EXTRA_CFLAGS to not affect configuration. (@jasone)
32+
- Fix a Valgrind integration bug. (@ronawho)
33+
- Disallow 0x5a junk filling when running in Valgrind. (@jasone)
34+
- Fix a file descriptor leak on Linux. This regression was first released in
35+
4.2.0. (@vsarunas, @jasone)
36+
- Fix static linking of jemalloc with glibc. (@djwatson)
37+
- Use syscall(2) rather than {open,read,close}(2) during boot on Linux. This
38+
works around other libraries' system call wrappers performing reentrant
39+
allocation. (@kspinka, @Whissi, @jasone)
40+
- Fix OS X default zone replacement to work with OS X 10.12. (@glandium,
41+
@jasone)
42+
- Fix cached memory management to avoid needless commit/decommit operations
43+
during purging, which resolves permanent virtual memory map fragmentation
44+
issues on Windows. (@mjp41, @jasone)
45+
- Fix TSD fetches to avoid (recursive) allocation. This is relevant to
46+
non-TLS and Windows configurations. (@jasone)
47+
- Fix malloc_conf overriding to work on Windows. (@jasone)
48+
- Forcibly disable lazy-lock on Windows (was forcibly *enabled*). (@jasone)
49+
750
* 4.2.1 (June 8, 2016)
851

952
Bug fixes:
@@ -19,7 +62,7 @@ brevity. Much more detail can be found in the git revision history:
1962

2063
New features:
2164
- Add the arena.<i>.reset mallctl, which makes it possible to discard all of
22-
an arena's allocations in a single operation. (@jasone@)
65+
an arena's allocations in a single operation. (@jasone)
2366
- Add the stats.retained and stats.arenas.<i>.retained statistics. (@jasone)
2467
- Add the --with-version configure option. (@jasone)
2568
- Support --with-lg-page values larger than actual page size. (@jasone)

Makefile.in

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ abs_objroot := @abs_objroot@
2424

2525
# Build parameters.
2626
CPPFLAGS := @CPPFLAGS@ -I$(srcroot)include -I$(objroot)include
27-
CFLAGS := @CFLAGS@
27+
EXTRA_CFLAGS := @EXTRA_CFLAGS@
28+
CFLAGS := @CFLAGS@ $(EXTRA_CFLAGS)
2829
LDFLAGS := @LDFLAGS@
2930
EXTRA_LDFLAGS := @EXTRA_LDFLAGS@
3031
LIBS := @LIBS@
@@ -52,15 +53,19 @@ enable_prof := @enable_prof@
5253
enable_valgrind := @enable_valgrind@
5354
enable_zone_allocator := @enable_zone_allocator@
5455
MALLOC_CONF := @JEMALLOC_CPREFIX@MALLOC_CONF
56+
link_whole_archive := @link_whole_archive@
5557
DSO_LDFLAGS = @DSO_LDFLAGS@
5658
SOREV = @SOREV@
5759
PIC_CFLAGS = @PIC_CFLAGS@
5860
CTARGET = @CTARGET@
5961
LDTARGET = @LDTARGET@
62+
TEST_LD_MODE = @TEST_LD_MODE@
6063
MKLIB = @MKLIB@
6164
AR = @AR@
6265
ARFLAGS = @ARFLAGS@
6366
CC_MM = @CC_MM@
67+
LM := @LM@
68+
INSTALL = @INSTALL@
6469

6570
ifeq (macho, $(ABI))
6671
TEST_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH="$(objroot)lib"
@@ -99,6 +104,7 @@ C_SRCS := $(srcroot)src/jemalloc.c \
99104
$(srcroot)src/quarantine.c \
100105
$(srcroot)src/rtree.c \
101106
$(srcroot)src/stats.c \
107+
$(srcroot)src/spin.c \
102108
$(srcroot)src/tcache.c \
103109
$(srcroot)src/ticker.c \
104110
$(srcroot)src/tsd.c \
@@ -122,6 +128,11 @@ DSOS := $(objroot)lib/$(LIBJEMALLOC).$(SOREV)
122128
ifneq ($(SOREV),$(SO))
123129
DSOS += $(objroot)lib/$(LIBJEMALLOC).$(SO)
124130
endif
131+
ifeq (1, $(link_whole_archive))
132+
LJEMALLOC := -Wl,--whole-archive -L$(objroot)lib -l$(LIBJEMALLOC) -Wl,--no-whole-archive
133+
else
134+
LJEMALLOC := $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
135+
endif
125136
PC := $(objroot)jemalloc.pc
126137
MAN3 := $(objroot)doc/jemalloc$(install_suffix).3
127138
DOCS_XML := $(objroot)doc/jemalloc$(install_suffix).xml
@@ -133,7 +144,11 @@ C_TESTLIB_SRCS := $(srcroot)test/src/btalloc.c $(srcroot)test/src/btalloc_0.c \
133144
$(srcroot)test/src/mtx.c $(srcroot)test/src/mq.c \
134145
$(srcroot)test/src/SFMT.c $(srcroot)test/src/test.c \
135146
$(srcroot)test/src/thd.c $(srcroot)test/src/timer.c
147+
ifeq (1, $(link_whole_archive))
148+
C_UTIL_INTEGRATION_SRCS :=
149+
else
136150
C_UTIL_INTEGRATION_SRCS := $(srcroot)src/nstime.c $(srcroot)src/util.c
151+
endif
137152
TESTS_UNIT := \
138153
$(srcroot)test/unit/a0.c \
139154
$(srcroot)test/unit/arena_reset.c \
@@ -295,69 +310,69 @@ $(STATIC_LIBS):
295310

296311
$(objroot)test/unit/%$(EXE): $(objroot)test/unit/%.$(O) $(TESTS_UNIT_LINK_OBJS) $(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS)
297312
@mkdir -p $(@D)
298-
$(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LDFLAGS) $(filter-out -lm,$(LIBS)) -lm $(EXTRA_LDFLAGS)
313+
$(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
299314

300315
$(objroot)test/integration/%$(EXE): $(objroot)test/integration/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
301316
@mkdir -p $(@D)
302-
$(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(filter -lpthread,$(LIBS))) -lm $(EXTRA_LDFLAGS)
317+
$(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LJEMALLOC) $(LDFLAGS) $(filter-out -lm,$(filter -lrt -lpthread,$(LIBS))) $(LM) $(EXTRA_LDFLAGS)
303318

304319
$(objroot)test/stress/%$(EXE): $(objroot)test/stress/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_STRESS_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
305320
@mkdir -p $(@D)
306-
$(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) -lm $(EXTRA_LDFLAGS)
321+
$(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
307322

308323
build_lib_shared: $(DSOS)
309324
build_lib_static: $(STATIC_LIBS)
310325
build_lib: build_lib_shared build_lib_static
311326

312327
install_bin:
313-
install -d $(BINDIR)
328+
$(INSTALL) -d $(BINDIR)
314329
@for b in $(BINS); do \
315-
echo "install -m 755 $$b $(BINDIR)"; \
316-
install -m 755 $$b $(BINDIR); \
330+
echo "$(INSTALL) -m 755 $$b $(BINDIR)"; \
331+
$(INSTALL) -m 755 $$b $(BINDIR); \
317332
done
318333

319334
install_include:
320-
install -d $(INCLUDEDIR)/jemalloc
335+
$(INSTALL) -d $(INCLUDEDIR)/jemalloc
321336
@for h in $(C_HDRS); do \
322-
echo "install -m 644 $$h $(INCLUDEDIR)/jemalloc"; \
323-
install -m 644 $$h $(INCLUDEDIR)/jemalloc; \
337+
echo "$(INSTALL) -m 644 $$h $(INCLUDEDIR)/jemalloc"; \
338+
$(INSTALL) -m 644 $$h $(INCLUDEDIR)/jemalloc; \
324339
done
325340

326341
install_lib_shared: $(DSOS)
327-
install -d $(LIBDIR)
328-
install -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)
342+
$(INSTALL) -d $(LIBDIR)
343+
$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)
329344
ifneq ($(SOREV),$(SO))
330345
ln -sf $(LIBJEMALLOC).$(SOREV) $(LIBDIR)/$(LIBJEMALLOC).$(SO)
331346
endif
332347

333348
install_lib_static: $(STATIC_LIBS)
334-
install -d $(LIBDIR)
349+
$(INSTALL) -d $(LIBDIR)
335350
@for l in $(STATIC_LIBS); do \
336-
echo "install -m 755 $$l $(LIBDIR)"; \
337-
install -m 755 $$l $(LIBDIR); \
351+
echo "$(INSTALL) -m 755 $$l $(LIBDIR)"; \
352+
$(INSTALL) -m 755 $$l $(LIBDIR); \
338353
done
339354

340355
install_lib_pc: $(PC)
341-
install -d $(LIBDIR)/pkgconfig
356+
$(INSTALL) -d $(LIBDIR)/pkgconfig
342357
@for l in $(PC); do \
343-
echo "install -m 644 $$l $(LIBDIR)/pkgconfig"; \
344-
install -m 644 $$l $(LIBDIR)/pkgconfig; \
358+
echo "$(INSTALL) -m 644 $$l $(LIBDIR)/pkgconfig"; \
359+
$(INSTALL) -m 644 $$l $(LIBDIR)/pkgconfig; \
345360
done
346361

347362
install_lib: install_lib_shared install_lib_static install_lib_pc
348363

349364
install_doc_html:
350-
install -d $(DATADIR)/doc/jemalloc$(install_suffix)
365+
$(INSTALL) -d $(DATADIR)/doc/jemalloc$(install_suffix)
351366
@for d in $(DOCS_HTML); do \
352-
echo "install -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix)"; \
353-
install -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix); \
367+
echo "$(INSTALL) -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix)"; \
368+
$(INSTALL) -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix); \
354369
done
355370

356371
install_doc_man:
357-
install -d $(MANDIR)/man3
372+
$(INSTALL) -d $(MANDIR)/man3
358373
@for d in $(DOCS_MAN3); do \
359-
echo "install -m 644 $$d $(MANDIR)/man3"; \
360-
install -m 644 $$d $(MANDIR)/man3; \
374+
echo "$(INSTALL) -m 644 $$d $(MANDIR)/man3"; \
375+
$(INSTALL) -m 644 $$d $(MANDIR)/man3; \
361376
done
362377

363378
install_doc: install_doc_html install_doc_man

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jemalloc.
1717

1818
The ChangeLog file contains a brief summary of changes for each release.
1919

20-
URL: http://www.canonware.com/jemalloc/
20+
URL: http://jemalloc.net/

0 commit comments

Comments
 (0)