]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/jemalloc/ChangeLog
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / jemalloc / ChangeLog
1 Following are change highlights associated with official releases.  Important
2 bug fixes are all mentioned, but internal enhancements are omitted here for
3 brevity (even though they are more fun to write about).  Much more detail can be
4 found 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.4.0 (June 2, 2013)
10
11   This version is essentially a small bugfix release, but the addition of
12   aarch64 support requires that the minor version be incremented.
13
14   Bug fixes:
15   - Fix race-triggered deadlocks in chunk_record().  These deadlocks were
16     typically triggered by multiple threads concurrently deallocating huge
17     objects.
18
19   New features:
20   - Add support for the aarch64 architecture.
21
22 * 3.3.1 (March 6, 2013)
23
24   This version fixes bugs that are typically encountered only when utilizing
25   custom run-time options.
26
27   Bug fixes:
28   - Fix a locking order bug that could cause deadlock during fork if heap
29     profiling were enabled.
30   - Fix a chunk recycling bug that could cause the allocator to lose track of
31     whether a chunk was zeroed.  On FreeBSD, NetBSD, and OS X, it could cause
32     corruption if allocating via sbrk(2) (unlikely unless running with the
33     "dss:primary" option specified).  This was completely harmless on Linux
34     unless using mlockall(2) (and unlikely even then, unless the
35     --disable-munmap configure option or the "dss:primary" option was
36     specified).  This regression was introduced in 3.1.0 by the
37     mlockall(2)/madvise(2) interaction fix.
38   - Fix TLS-related memory corruption that could occur during thread exit if the
39     thread never allocated memory.  Only the quarantine and prof facilities were
40     susceptible.
41   - Fix two quarantine bugs:
42     + Internal reallocation of the quarantined object array leaked the old
43       array.
44     + Reallocation failure for internal reallocation of the quarantined object
45       array (very unlikely) resulted in memory corruption.
46   - Fix Valgrind integration to annotate all internally allocated memory in a
47     way that keeps Valgrind happy about internal data structure access.
48   - Fix building for s390 systems.
49
50 * 3.3.0 (January 23, 2013)
51
52   This version includes a few minor performance improvements in addition to the
53   listed new features and bug fixes.
54
55   New features:
56   - Add clipping support to lg_chunk option processing.
57   - Add the --enable-ivsalloc option.
58   - Add the --without-export option.
59   - Add the --disable-zone-allocator option.
60
61   Bug fixes:
62   - Fix "arenas.extend" mallctl to output the number of arenas.
63   - Fix chunk_recycyle() to unconditionally inform Valgrind that returned memory
64     is undefined.
65   - Fix build break on FreeBSD related to alloca.h.
66
67 * 3.2.0 (November 9, 2012)
68
69   In addition to a couple of bug fixes, this version modifies page run
70   allocation and dirty page purging algorithms in order to better control
71   page-level virtual memory fragmentation.
72
73   Incompatible changes:
74   - Change the "opt.lg_dirty_mult" default from 5 to 3 (32:1 to 8:1).
75
76   Bug fixes:
77   - Fix dss/mmap allocation precedence code to use recyclable mmap memory only
78     after primary dss allocation fails.
79   - Fix deadlock in the "arenas.purge" mallctl.  This regression was introduced
80     in 3.1.0 by the addition of the "arena.<i>.purge" mallctl.
81
82 * 3.1.0 (October 16, 2012)
83
84   New features:
85   - Auto-detect whether running inside Valgrind, thus removing the need to
86     manually specify MALLOC_CONF=valgrind:true.
87   - Add the "arenas.extend" mallctl, which allows applications to create
88     manually managed arenas.
89   - Add the ALLOCM_ARENA() flag for {,r,d}allocm().
90   - Add the "opt.dss", "arena.<i>.dss", and "stats.arenas.<i>.dss" mallctls,
91     which provide control over dss/mmap precedence.
92   - Add the "arena.<i>.purge" mallctl, which obsoletes "arenas.purge".
93   - Define LG_QUANTUM for hppa.
94
95   Incompatible changes:
96   - Disable tcache by default if running inside Valgrind, in order to avoid
97     making unallocated objects appear reachable to Valgrind.
98   - Drop const from malloc_usable_size() argument on Linux.
99
100   Bug fixes:
101   - Fix heap profiling crash if sampled object is freed via realloc(p, 0).
102   - Remove const from __*_hook variable declarations, so that glibc can modify
103     them during process forking.
104   - Fix mlockall(2)/madvise(2) interaction.
105   - Fix fork(2)-related deadlocks.
106   - Fix error return value for "thread.tcache.enabled" mallctl.
107
108 * 3.0.0 (May 11, 2012)
109
110   Although this version adds some major new features, the primary focus is on
111   internal code cleanup that facilitates maintainability and portability, most
112   of which is not reflected in the ChangeLog.  This is the first release to
113   incorporate substantial contributions from numerous other developers, and the
114   result is a more broadly useful allocator (see the git revision history for
115   contribution details).  Note that the license has been unified, thanks to
116   Facebook granting a license under the same terms as the other copyright
117   holders (see COPYING).
118
119   New features:
120   - Implement Valgrind support, redzones, and quarantine.
121   - Add support for additional platforms:
122     + FreeBSD
123     + Mac OS X Lion
124     + MinGW
125     + Windows (no support yet for replacing the system malloc)
126   - Add support for additional architectures:
127     + MIPS
128     + SH4
129     + Tilera
130   - Add support for cross compiling.
131   - Add nallocm(), which rounds a request size up to the nearest size class
132     without actually allocating.
133   - Implement aligned_alloc() (blame C11).
134   - Add the "thread.tcache.enabled" mallctl.
135   - Add the "opt.prof_final" mallctl.
136   - Update pprof (from gperftools 2.0).
137   - Add the --with-mangling option.
138   - Add the --disable-experimental option.
139   - Add the --disable-munmap option, and make it the default on Linux.
140   - Add the --enable-mremap option, which disables use of mremap(2) by default.
141
142   Incompatible changes:
143   - Enable stats by default.
144   - Enable fill by default.
145   - Disable lazy locking by default.
146   - Rename the "tcache.flush" mallctl to "thread.tcache.flush".
147   - Rename the "arenas.pagesize" mallctl to "arenas.page".
148   - Change the "opt.lg_prof_sample" default from 0 to 19 (1 B to 512 KiB).
149   - Change the "opt.prof_accum" default from true to false.
150
151   Removed features:
152   - Remove the swap feature, including the "config.swap", "swap.avail",
153     "swap.prezeroed", "swap.nfds", and "swap.fds" mallctls.
154   - Remove highruns statistics, including the
155     "stats.arenas.<i>.bins.<j>.highruns" and
156     "stats.arenas.<i>.lruns.<j>.highruns" mallctls.
157   - As part of small size class refactoring, remove the "opt.lg_[qc]space_max",
158     "arenas.cacheline", "arenas.subpage", "arenas.[tqcs]space_{min,max}", and
159     "arenas.[tqcs]bins" mallctls.
160   - Remove the "arenas.chunksize" mallctl.
161   - Remove the "opt.lg_prof_tcmax" option.
162   - Remove the "opt.lg_prof_bt_max" option.
163   - Remove the "opt.lg_tcache_gc_sweep" option.
164   - Remove the --disable-tiny option, including the "config.tiny" mallctl.
165   - Remove the --enable-dynamic-page-shift configure option.
166   - Remove the --enable-sysv configure option.
167
168   Bug fixes:
169   - Fix a statistics-related bug in the "thread.arena" mallctl that could cause
170     invalid statistics and crashes.
171   - Work around TLS deallocation via free() on Linux.  This bug could cause
172     write-after-free memory corruption.
173   - Fix a potential deadlock that could occur during interval- and
174     growth-triggered heap profile dumps.
175   - Fix large calloc() zeroing bugs due to dropping chunk map unzeroed flags.
176   - Fix chunk_alloc_dss() to stop claiming memory is zeroed.  This bug could
177     cause memory corruption and crashes with --enable-dss specified.
178   - Fix fork-related bugs that could cause deadlock in children between fork
179     and exec.
180   - Fix malloc_stats_print() to honor 'b' and 'l' in the opts parameter.
181   - Fix realloc(p, 0) to act like free(p).
182   - Do not enforce minimum alignment in memalign().
183   - Check for NULL pointer in malloc_usable_size().
184   - Fix an off-by-one heap profile statistics bug that could be observed in
185     interval- and growth-triggered heap profiles.
186   - Fix the "epoch" mallctl to update cached stats even if the passed in epoch
187     is 0.
188   - Fix bin->runcur management to fix a layout policy bug.  This bug did not
189     affect correctness.
190   - Fix a bug in choose_arena_hard() that potentially caused more arenas to be
191     initialized than necessary.
192   - Add missing "opt.lg_tcache_max" mallctl implementation.
193   - Use glibc allocator hooks to make mixed allocator usage less likely.
194   - Fix build issues for --disable-tcache.
195   - Don't mangle pthread_create() when --with-private-namespace is specified.
196
197 * 2.2.5 (November 14, 2011)
198
199   Bug fixes:
200   - Fix huge_ralloc() race when using mremap(2).  This is a serious bug that
201     could cause memory corruption and/or crashes.
202   - Fix huge_ralloc() to maintain chunk statistics.
203   - Fix malloc_stats_print(..., "a") output.
204
205 * 2.2.4 (November 5, 2011)
206
207   Bug fixes:
208   - Initialize arenas_tsd before using it.  This bug existed for 2.2.[0-3], as
209     well as for --disable-tls builds in earlier releases.
210   - Do not assume a 4 KiB page size in test/rallocm.c.
211
212 * 2.2.3 (August 31, 2011)
213
214   This version fixes numerous bugs related to heap profiling.
215
216   Bug fixes:
217   - Fix a prof-related race condition.  This bug could cause memory corruption,
218     but only occurred in non-default configurations (prof_accum:false).
219   - Fix off-by-one backtracing issues (make sure that prof_alloc_prep() is
220     excluded from backtraces).
221   - Fix a prof-related bug in realloc() (only triggered by OOM errors).
222   - Fix prof-related bugs in allocm() and rallocm().
223   - Fix prof_tdata_cleanup() for --disable-tls builds.
224   - Fix a relative include path, to fix objdir builds.
225
226 * 2.2.2 (July 30, 2011)
227
228   Bug fixes:
229   - Fix a build error for --disable-tcache.
230   - Fix assertions in arena_purge() (for real this time).
231   - Add the --with-private-namespace option.  This is a workaround for symbol
232     conflicts that can inadvertently arise when using static libraries.
233
234 * 2.2.1 (March 30, 2011)
235
236   Bug fixes:
237   - Implement atomic operations for x86/x64.  This fixes compilation failures
238     for versions of gcc that are still in wide use.
239   - Fix an assertion in arena_purge().
240
241 * 2.2.0 (March 22, 2011)
242
243   This version incorporates several improvements to algorithms and data
244   structures that tend to reduce fragmentation and increase speed.
245
246   New features:
247   - Add the "stats.cactive" mallctl.
248   - Update pprof (from google-perftools 1.7).
249   - Improve backtracing-related configuration logic, and add the
250     --disable-prof-libgcc option.
251
252   Bug fixes:
253   - Change default symbol visibility from "internal", to "hidden", which
254     decreases the overhead of library-internal function calls.
255   - Fix symbol visibility so that it is also set on OS X.
256   - Fix a build dependency regression caused by the introduction of the .pic.o
257     suffix for PIC object files.
258   - Add missing checks for mutex initialization failures.
259   - Don't use libgcc-based backtracing except on x64, where it is known to work.
260   - Fix deadlocks on OS X that were due to memory allocation in
261     pthread_mutex_lock().
262   - Heap profiling-specific fixes:
263     + Fix memory corruption due to integer overflow in small region index
264       computation, when using a small enough sample interval that profiling
265       context pointers are stored in small run headers.
266     + Fix a bootstrap ordering bug that only occurred with TLS disabled.
267     + Fix a rallocm() rsize bug.
268     + Fix error detection bugs for aligned memory allocation.
269
270 * 2.1.3 (March 14, 2011)
271
272   Bug fixes:
273   - Fix a cpp logic regression (due to the "thread.{de,}allocatedp" mallctl fix
274     for OS X in 2.1.2).
275   - Fix a "thread.arena" mallctl bug.
276   - Fix a thread cache stats merging bug.
277
278 * 2.1.2 (March 2, 2011)
279
280   Bug fixes:
281   - Fix "thread.{de,}allocatedp" mallctl for OS X.
282   - Add missing jemalloc.a to build system.
283
284 * 2.1.1 (January 31, 2011)
285
286   Bug fixes:
287   - Fix aligned huge reallocation (affected allocm()).
288   - Fix the ALLOCM_LG_ALIGN macro definition.
289   - Fix a heap dumping deadlock.
290   - Fix a "thread.arena" mallctl bug.
291
292 * 2.1.0 (December 3, 2010)
293
294   This version incorporates some optimizations that can't quite be considered
295   bug fixes.
296
297   New features:
298   - Use Linux's mremap(2) for huge object reallocation when possible.
299   - Avoid locking in mallctl*() when possible.
300   - Add the "thread.[de]allocatedp" mallctl's.
301   - Convert the manual page source from roff to DocBook, and generate both roff
302     and HTML manuals.
303
304   Bug fixes:
305   - Fix a crash due to incorrect bootstrap ordering.  This only impacted
306     --enable-debug --enable-dss configurations.
307   - Fix a minor statistics bug for mallctl("swap.avail", ...).
308
309 * 2.0.1 (October 29, 2010)
310
311   Bug fixes:
312   - Fix a race condition in heap profiling that could cause undefined behavior
313     if "opt.prof_accum" were disabled.
314   - Add missing mutex unlocks for some OOM error paths in the heap profiling
315     code.
316   - Fix a compilation error for non-C99 builds.
317
318 * 2.0.0 (October 24, 2010)
319
320   This version focuses on the experimental *allocm() API, and on improved
321   run-time configuration/introspection.  Nonetheless, numerous performance
322   improvements are also included.
323
324   New features:
325   - Implement the experimental {,r,s,d}allocm() API, which provides a superset
326     of the functionality available via malloc(), calloc(), posix_memalign(),
327     realloc(), malloc_usable_size(), and free().  These functions can be used to
328     allocate/reallocate aligned zeroed memory, ask for optional extra memory
329     during reallocation, prevent object movement during reallocation, etc.
330   - Replace JEMALLOC_OPTIONS/JEMALLOC_PROF_PREFIX with MALLOC_CONF, which is
331     more human-readable, and more flexible.  For example:
332       JEMALLOC_OPTIONS=AJP
333     is now:
334       MALLOC_CONF=abort:true,fill:true,stats_print:true
335   - Port to Apple OS X.  Sponsored by Mozilla.
336   - Make it possible for the application to control thread-->arena mappings via
337     the "thread.arena" mallctl.
338   - Add compile-time support for all TLS-related functionality via pthreads TSD.
339     This is mainly of interest for OS X, which does not support TLS, but has a
340     TSD implementation with similar performance.
341   - Override memalign() and valloc() if they are provided by the system.
342   - Add the "arenas.purge" mallctl, which can be used to synchronously purge all
343     dirty unused pages.
344   - Make cumulative heap profiling data optional, so that it is possible to
345     limit the amount of memory consumed by heap profiling data structures.
346   - Add per thread allocation counters that can be accessed via the
347     "thread.allocated" and "thread.deallocated" mallctls.
348
349   Incompatible changes:
350   - Remove JEMALLOC_OPTIONS and malloc_options (see MALLOC_CONF above).
351   - Increase default backtrace depth from 4 to 128 for heap profiling.
352   - Disable interval-based profile dumps by default.
353
354   Bug fixes:
355   - Remove bad assertions in fork handler functions.  These assertions could
356     cause aborts for some combinations of configure settings.
357   - Fix strerror_r() usage to deal with non-standard semantics in GNU libc.
358   - Fix leak context reporting.  This bug tended to cause the number of contexts
359     to be underreported (though the reported number of objects and bytes were
360     correct).
361   - Fix a realloc() bug for large in-place growing reallocation.  This bug could
362     cause memory corruption, but it was hard to trigger.
363   - Fix an allocation bug for small allocations that could be triggered if
364     multiple threads raced to create a new run of backing pages.
365   - Enhance the heap profiler to trigger samples based on usable size, rather
366     than request size.
367   - Fix a heap profiling bug due to sometimes losing track of requested object
368     size for sampled objects.
369
370 * 1.0.3 (August 12, 2010)
371
372   Bug fixes:
373   - Fix the libunwind-based implementation of stack backtracing (used for heap
374     profiling).  This bug could cause zero-length backtraces to be reported.
375   - Add a missing mutex unlock in library initialization code.  If multiple
376     threads raced to initialize malloc, some of them could end up permanently
377     blocked.
378
379 * 1.0.2 (May 11, 2010)
380
381   Bug fixes:
382   - Fix junk filling of large objects, which could cause memory corruption.
383   - Add MAP_NORESERVE support for chunk mapping, because otherwise virtual
384     memory limits could cause swap file configuration to fail.  Contributed by
385     Jordan DeLong.
386
387 * 1.0.1 (April 14, 2010)
388
389   Bug fixes:
390   - Fix compilation when --enable-fill is specified.
391   - Fix threads-related profiling bugs that affected accuracy and caused memory
392     to be leaked during thread exit.
393   - Fix dirty page purging race conditions that could cause crashes.
394   - Fix crash in tcache flushing code during thread destruction.
395
396 * 1.0.0 (April 11, 2010)
397
398   This release focuses on speed and run-time introspection.  Numerous
399   algorithmic improvements make this release substantially faster than its
400   predecessors.
401
402   New features:
403   - Implement autoconf-based configuration system.
404   - Add mallctl*(), for the purposes of introspection and run-time
405     configuration.
406   - Make it possible for the application to manually flush a thread's cache, via
407     the "tcache.flush" mallctl.
408   - Base maximum dirty page count on proportion of active memory.
409   - Compute various addtional run-time statistics, including per size class
410     statistics for large objects.
411   - Expose malloc_stats_print(), which can be called repeatedly by the
412     application.
413   - Simplify the malloc_message() signature to only take one string argument,
414     and incorporate an opaque data pointer argument for use by the application
415     in combination with malloc_stats_print().
416   - Add support for allocation backed by one or more swap files, and allow the
417     application to disable over-commit if swap files are in use.
418   - Implement allocation profiling and leak checking.
419
420   Removed features:
421   - Remove the dynamic arena rebalancing code, since thread-specific caching
422     reduces its utility.
423
424   Bug fixes:
425   - Modify chunk allocation to work when address space layout randomization
426     (ASLR) is in use.
427   - Fix thread cleanup bugs related to TLS destruction.
428   - Handle 0-size allocation requests in posix_memalign().
429   - Fix a chunk leak.  The leaked chunks were never touched, so this impacted
430     virtual memory usage, but not physical memory usage.
431
432 * linux_2008082[78]a (August 27/28, 2008)
433
434   These snapshot releases are the simple result of incorporating Linux-specific
435   support into the FreeBSD malloc sources.
436
437 --------------------------------------------------------------------------------
438 vim:filetype=text:textwidth=80