xref: /freebsd/contrib/jemalloc/ChangeLog (revision 8ed34ab00dc684db97a9e5ba466fa7142fbfc7d2)
1Following are change highlights associated with official releases.  Important
2bug fixes are all mentioned, but internal enhancements are omitted here for
3brevity (even though they are more fun to write about).  Much more detail can be
4found in the git revision history:
5
6    http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git
7    git://canonware.com/jemalloc.git
8
9* 3.0.0 (XXX not yet released)
10
11  Although this version adds some major new features, the primary focus is on
12  internal code cleanup that facilitates maintainability and portability, most
13  of which is not reflected in the ChangeLog.  This is the first release to
14  incorporate substantial contributions from numerous other developers, and the
15  result is a more broadly useful allocator (see the git revision history for
16  contribution details).  Note that the license has been unified, thanks to
17  Facebook granting a license under the same terms as the other copyright
18  holders (see COPYING).
19
20  New features:
21  - Implement Valgrind support, redzones, and quarantine.
22  - Add support for additional operating systems:
23    + FreeBSD
24    + Mac OS X Lion
25  - Add support for additional architectures:
26    + MIPS
27    + SH4
28    + Tilera
29  - Add support for cross compiling.
30  - Add nallocm(), which rounds a request size up to the nearest size class
31    without actually allocating.
32  - Implement aligned_alloc() (blame C11).
33  - Add the --disable-munmap option, and make it the default on Linux.
34  - Add the --with-mangling option.
35  - Add the --disable-experimental option.
36  - Add the "thread.tcache.enabled" mallctl.
37  - Add the "opt.prof_final" mallctl.
38  - Update pprof (from gperftools 2.0).
39
40  Incompatible changes:
41  - Enable stats by default.
42  - Enable fill by default.
43  - Disable lazy locking by default.
44  - Rename the "tcache.flush" mallctl to "thread.tcache.flush".
45  - Rename the "arenas.pagesize" mallctl to "arenas.page".
46  - Change the "opt.lg_prof_sample" default from 0 to 19 (1 B to 512 KiB).
47  - Change the "opt.prof_accum" default from true to false.
48
49  Removed features:
50  - Remove the swap feature, including the "config.swap", "swap.avail",
51    "swap.prezeroed", "swap.nfds", and "swap.fds" mallctls.
52  - Remove highruns statistics, including the
53    "stats.arenas.<i>.bins.<j>.highruns" and
54    "stats.arenas.<i>.lruns.<j>.highruns" mallctls.
55  - As part of small size class refactoring, remove the "opt.lg_[qc]space_max",
56    "arenas.cacheline", "arenas.subpage", "arenas.[tqcs]space_{min,max}", and
57    "arenas.[tqcs]bins" mallctls.
58  - Remove the "arenas.chunksize" mallctl.
59  - Remove the "opt.lg_prof_tcmax" option.
60  - Remove the "opt.lg_prof_bt_max" option.
61  - Remove the "opt.lg_tcache_gc_sweep" option.
62  - Remove the --disable-tiny option, including the "config.tiny" mallctl.
63  - Remove the --enable-dynamic-page-shift configure option.
64  - Remove the --enable-sysv configure option.
65
66  Bug fixes:
67  - Fix fork-related bugs that could cause deadlock in children between fork
68    and exec.
69  - Fix a statistics-related bug in the "thread.arena" mallctl that could cause
70    invalid statistics and crashes.
71  - Work around TLS dallocation via free() on Linux.  This bug could cause
72    write-after-free memory corruption.
73  - Fix malloc_stats_print() to honor 'b' and 'l' in the opts parameter.
74  - Fix realloc(p, 0) to act like free(p).
75  - Do not enforce minimum alignment in memalign().
76  - Check for NULL pointer in malloc_usable_size().
77  - Fix bin->runcur management to fix a layout policy bug.  This bug did not
78    affect correctness.
79  - Fix a bug in choose_arena_hard() that potentially caused more arenas to be
80    initialized than necessary.
81  - Add missing "opt.lg_tcache_max" mallctl implementation.
82  - Use glibc allocator hooks to make mixed allocator usage less likely.
83  - Fix build issues for --disable-tcache.
84  - Don't mangle pthread_create() when --with-private-namespace is specified.
85
86* 2.2.5 (November 14, 2011)
87
88  Bug fixes:
89  - Fix huge_ralloc() race when using mremap(2).  This is a serious bug that
90    could cause memory corruption and/or crashes.
91  - Fix huge_ralloc() to maintain chunk statistics.
92  - Fix malloc_stats_print(..., "a") output.
93
94* 2.2.4 (November 5, 2011)
95
96  Bug fixes:
97  - Initialize arenas_tsd before using it.  This bug existed for 2.2.[0-3], as
98    well as for --disable-tls builds in earlier releases.
99  - Do not assume a 4 KiB page size in test/rallocm.c.
100
101* 2.2.3 (August 31, 2011)
102
103  This version fixes numerous bugs related to heap profiling.
104
105  Bug fixes:
106  - Fix a prof-related race condition.  This bug could cause memory corruption,
107    but only occurred in non-default configurations (prof_accum:false).
108  - Fix off-by-one backtracing issues (make sure that prof_alloc_prep() is
109    excluded from backtraces).
110  - Fix a prof-related bug in realloc() (only triggered by OOM errors).
111  - Fix prof-related bugs in allocm() and rallocm().
112  - Fix prof_tdata_cleanup() for --disable-tls builds.
113  - Fix a relative include path, to fix objdir builds.
114
115* 2.2.2 (July 30, 2011)
116
117  Bug fixes:
118  - Fix a build error for --disable-tcache.
119  - Fix assertions in arena_purge() (for real this time).
120  - Add the --with-private-namespace option.  This is a workaround for symbol
121    conflicts that can inadvertently arise when using static libraries.
122
123* 2.2.1 (March 30, 2011)
124
125  Bug fixes:
126  - Implement atomic operations for x86/x64.  This fixes compilation failures
127    for versions of gcc that are still in wide use.
128  - Fix an assertion in arena_purge().
129
130* 2.2.0 (March 22, 2011)
131
132  This version incorporates several improvements to algorithms and data
133  structures that tend to reduce fragmentation and increase speed.
134
135  New features:
136  - Add the "stats.cactive" mallctl.
137  - Update pprof (from google-perftools 1.7).
138  - Improve backtracing-related configuration logic, and add the
139    --disable-prof-libgcc option.
140
141  Bug fixes:
142  - Change default symbol visibility from "internal", to "hidden", which
143    decreases the overhead of library-internal function calls.
144  - Fix symbol visibility so that it is also set on OS X.
145  - Fix a build dependency regression caused by the introduction of the .pic.o
146    suffix for PIC object files.
147  - Add missing checks for mutex initialization failures.
148  - Don't use libgcc-based backtracing except on x64, where it is known to work.
149  - Fix deadlocks on OS X that were due to memory allocation in
150    pthread_mutex_lock().
151  - Heap profiling-specific fixes:
152    + Fix memory corruption due to integer overflow in small region index
153      computation, when using a small enough sample interval that profiling
154      context pointers are stored in small run headers.
155    + Fix a bootstrap ordering bug that only occurred with TLS disabled.
156    + Fix a rallocm() rsize bug.
157    + Fix error detection bugs for aligned memory allocation.
158
159* 2.1.3 (March 14, 2011)
160
161  Bug fixes:
162  - Fix a cpp logic regression (due to the "thread.{de,}allocatedp" mallctl fix
163    for OS X in 2.1.2).
164  - Fix a "thread.arena" mallctl bug.
165  - Fix a thread cache stats merging bug.
166
167* 2.1.2 (March 2, 2011)
168
169  Bug fixes:
170  - Fix "thread.{de,}allocatedp" mallctl for OS X.
171  - Add missing jemalloc.a to build system.
172
173* 2.1.1 (January 31, 2011)
174
175  Bug fixes:
176  - Fix aligned huge reallocation (affected allocm()).
177  - Fix the ALLOCM_LG_ALIGN macro definition.
178  - Fix a heap dumping deadlock.
179  - Fix a "thread.arena" mallctl bug.
180
181* 2.1.0 (December 3, 2010)
182
183  This version incorporates some optimizations that can't quite be considered
184  bug fixes.
185
186  New features:
187  - Use Linux's mremap(2) for huge object reallocation when possible.
188  - Avoid locking in mallctl*() when possible.
189  - Add the "thread.[de]allocatedp" mallctl's.
190  - Convert the manual page source from roff to DocBook, and generate both roff
191    and HTML manuals.
192
193  Bug fixes:
194  - Fix a crash due to incorrect bootstrap ordering.  This only impacted
195    --enable-debug --enable-dss configurations.
196  - Fix a minor statistics bug for mallctl("swap.avail", ...).
197
198* 2.0.1 (October 29, 2010)
199
200  Bug fixes:
201  - Fix a race condition in heap profiling that could cause undefined behavior
202    if "opt.prof_accum" were disabled.
203  - Add missing mutex unlocks for some OOM error paths in the heap profiling
204    code.
205  - Fix a compilation error for non-C99 builds.
206
207* 2.0.0 (October 24, 2010)
208
209  This version focuses on the experimental *allocm() API, and on improved
210  run-time configuration/introspection.  Nonetheless, numerous performance
211  improvements are also included.
212
213  New features:
214  - Implement the experimental {,r,s,d}allocm() API, which provides a superset
215    of the functionality available via malloc(), calloc(), posix_memalign(),
216    realloc(), malloc_usable_size(), and free().  These functions can be used to
217    allocate/reallocate aligned zeroed memory, ask for optional extra memory
218    during reallocation, prevent object movement during reallocation, etc.
219  - Replace JEMALLOC_OPTIONS/JEMALLOC_PROF_PREFIX with MALLOC_CONF, which is
220    more human-readable, and more flexible.  For example:
221      JEMALLOC_OPTIONS=AJP
222    is now:
223      MALLOC_CONF=abort:true,fill:true,stats_print:true
224  - Port to Apple OS X.  Sponsored by Mozilla.
225  - Make it possible for the application to control thread-->arena mappings via
226    the "thread.arena" mallctl.
227  - Add compile-time support for all TLS-related functionality via pthreads TSD.
228    This is mainly of interest for OS X, which does not support TLS, but has a
229    TSD implementation with similar performance.
230  - Override memalign() and valloc() if they are provided by the system.
231  - Add the "arenas.purge" mallctl, which can be used to synchronously purge all
232    dirty unused pages.
233  - Make cumulative heap profiling data optional, so that it is possible to
234    limit the amount of memory consumed by heap profiling data structures.
235  - Add per thread allocation counters that can be accessed via the
236    "thread.allocated" and "thread.deallocated" mallctls.
237
238  Incompatible changes:
239  - Remove JEMALLOC_OPTIONS and malloc_options (see MALLOC_CONF above).
240  - Increase default backtrace depth from 4 to 128 for heap profiling.
241  - Disable interval-based profile dumps by default.
242
243  Bug fixes:
244  - Remove bad assertions in fork handler functions.  These assertions could
245    cause aborts for some combinations of configure settings.
246  - Fix strerror_r() usage to deal with non-standard semantics in GNU libc.
247  - Fix leak context reporting.  This bug tended to cause the number of contexts
248    to be underreported (though the reported number of objects and bytes were
249    correct).
250  - Fix a realloc() bug for large in-place growing reallocation.  This bug could
251    cause memory corruption, but it was hard to trigger.
252  - Fix an allocation bug for small allocations that could be triggered if
253    multiple threads raced to create a new run of backing pages.
254  - Enhance the heap profiler to trigger samples based on usable size, rather
255    than request size.
256  - Fix a heap profiling bug due to sometimes losing track of requested object
257    size for sampled objects.
258
259* 1.0.3 (August 12, 2010)
260
261  Bug fixes:
262  - Fix the libunwind-based implementation of stack backtracing (used for heap
263    profiling).  This bug could cause zero-length backtraces to be reported.
264  - Add a missing mutex unlock in library initialization code.  If multiple
265    threads raced to initialize malloc, some of them could end up permanently
266    blocked.
267
268* 1.0.2 (May 11, 2010)
269
270  Bug fixes:
271  - Fix junk filling of large objects, which could cause memory corruption.
272  - Add MAP_NORESERVE support for chunk mapping, because otherwise virtual
273    memory limits could cause swap file configuration to fail.  Contributed by
274    Jordan DeLong.
275
276* 1.0.1 (April 14, 2010)
277
278  Bug fixes:
279  - Fix compilation when --enable-fill is specified.
280  - Fix threads-related profiling bugs that affected accuracy and caused memory
281    to be leaked during thread exit.
282  - Fix dirty page purging race conditions that could cause crashes.
283  - Fix crash in tcache flushing code during thread destruction.
284
285* 1.0.0 (April 11, 2010)
286
287  This release focuses on speed and run-time introspection.  Numerous
288  algorithmic improvements make this release substantially faster than its
289  predecessors.
290
291  New features:
292  - Implement autoconf-based configuration system.
293  - Add mallctl*(), for the purposes of introspection and run-time
294    configuration.
295  - Make it possible for the application to manually flush a thread's cache, via
296    the "tcache.flush" mallctl.
297  - Base maximum dirty page count on proportion of active memory.
298  - Compute various addtional run-time statistics, including per size class
299    statistics for large objects.
300  - Expose malloc_stats_print(), which can be called repeatedly by the
301    application.
302  - Simplify the malloc_message() signature to only take one string argument,
303    and incorporate an opaque data pointer argument for use by the application
304    in combination with malloc_stats_print().
305  - Add support for allocation backed by one or more swap files, and allow the
306    application to disable over-commit if swap files are in use.
307  - Implement allocation profiling and leak checking.
308
309  Removed features:
310  - Remove the dynamic arena rebalancing code, since thread-specific caching
311    reduces its utility.
312
313  Bug fixes:
314  - Modify chunk allocation to work when address space layout randomization
315    (ASLR) is in use.
316  - Fix thread cleanup bugs related to TLS destruction.
317  - Handle 0-size allocation requests in posix_memalign().
318  - Fix a chunk leak.  The leaked chunks were never touched, so this impacted
319    virtual memory usage, but not physical memory usage.
320
321* linux_2008082[78]a (August 27/28, 2008)
322
323  These snapshot releases are the simple result of incorporating Linux-specific
324  support into the FreeBSD malloc sources.
325
326--------------------------------------------------------------------------------
327vim:filetype=text:textwidth=80
328