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