blob: 374459de99f9df9235e52039324431d4bd7c5cb5 [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 Evans6eb84fb2012-11-29 22:13:04 -08009* 3.x.x (Not yet released)
10
11 Bug fixes:
12 - Fix "arenas.extend" mallctl to output the number of arenas.
Jason Evans12711852012-12-12 10:12:18 -080013 - Fix chunk_recycyle() to unconditionally inform Valgrind that returned memory
14 is undefined.
Jason Evans6eb84fb2012-11-29 22:13:04 -080015
Jason Evans556ddc72012-11-07 15:16:29 -080016* 3.2.0 (November 9, 2012)
17
18 In addition to a couple of bug fixes, this version modifies page run
19 allocation and dirty page purging algorithms in order to better control
20 page-level virtual memory fragmentation.
Jason Evans12efefb2012-10-16 22:06:56 -070021
Jason Evanse3d13062012-10-30 15:42:37 -070022 Incompatible changes:
Jason Evans556ddc72012-11-07 15:16:29 -080023 - Change the "opt.lg_dirty_mult" default from 5 to 3 (32:1 to 8:1).
Jason Evanse3d13062012-10-30 15:42:37 -070024
Jason Evans12efefb2012-10-16 22:06:56 -070025 Bug fixes:
26 - Fix dss/mmap allocation precedence code to use recyclable mmap memory only
27 after primary dss allocation fails.
Jason Evanse3d13062012-10-30 15:42:37 -070028 - Fix deadlock in the "arenas.purge" mallctl. This regression was introduced
29 in 3.1.0 by the addition of the "arena.<i>.purge" mallctl.
Jason Evans12efefb2012-10-16 22:06:56 -070030
Jason Evans2b592b02012-10-16 10:12:40 -070031* 3.1.0 (October 16, 2012)
Jason Evans3860eac2012-05-15 13:53:21 -070032
Jason Evans781fe752012-05-15 14:48:14 -070033 New features:
34 - Auto-detect whether running inside Valgrind, thus removing the need to
35 manually specify MALLOC_CONF=valgrind:true.
Jason Evans2b592b02012-10-16 10:12:40 -070036 - Add the "arenas.extend" mallctl, which allows applications to create
37 manually managed arenas.
38 - Add the ALLOCM_ARENA() flag for {,r,d}allocm().
39 - Add the "opt.dss", "arena.<i>.dss", and "stats.arenas.<i>.dss" mallctls,
40 which provide control over dss/mmap precedence.
41 - Add the "arena.<i>.purge" mallctl, which obsoletes "arenas.purge".
42 - Define LG_QUANTUM for hppa.
Jason Evans781fe752012-05-15 14:48:14 -070043
Jason Evans174b70e2012-05-15 23:31:53 -070044 Incompatible changes:
45 - Disable tcache by default if running inside Valgrind, in order to avoid
46 making unallocated objects appear reachable to Valgrind.
Jason Evans2b592b02012-10-16 10:12:40 -070047 - Drop const from malloc_usable_size() argument on Linux.
Jason Evans174b70e2012-05-15 23:31:53 -070048
Jason Evans3860eac2012-05-15 13:53:21 -070049 Bug fixes:
50 - Fix heap profiling crash if sampled object is freed via realloc(p, 0).
Jason Evans5c710ce2012-05-23 16:09:22 -070051 - Remove const from __*_hook variable declarations, so that glibc can modify
52 them during process forking.
Jason Evans2b592b02012-10-16 10:12:40 -070053 - Fix mlockall(2)/madvise(2) interaction.
54 - Fix fork(2)-related deadlocks.
55 - Fix error return value for "thread.tcache.enabled" mallctl.
Jason Evans3860eac2012-05-15 13:53:21 -070056
Jason Evanscbb71ca2012-05-11 17:00:20 -070057* 3.0.0 (May 11, 2012)
Jason Evans9ef7f5d2012-04-16 18:16:48 -070058
59 Although this version adds some major new features, the primary focus is on
60 internal code cleanup that facilitates maintainability and portability, most
61 of which is not reflected in the ChangeLog. This is the first release to
62 incorporate substantial contributions from numerous other developers, and the
63 result is a more broadly useful allocator (see the git revision history for
64 contribution details). Note that the license has been unified, thanks to
65 Facebook granting a license under the same terms as the other copyright
66 holders (see COPYING).
67
68 New features:
69 - Implement Valgrind support, redzones, and quarantine.
Jason Evans079687b2012-04-23 12:49:23 -070070 - Add support for additional platforms:
Jason Evans9ef7f5d2012-04-16 18:16:48 -070071 + FreeBSD
72 + Mac OS X Lion
Jason Evans40f514f2012-04-22 16:21:06 -070073 + MinGW
Jason Evanscbb71ca2012-05-11 17:00:20 -070074 + Windows (no support yet for replacing the system malloc)
Jason Evans9ef7f5d2012-04-16 18:16:48 -070075 - Add support for additional architectures:
76 + MIPS
77 + SH4
78 + Tilera
79 - Add support for cross compiling.
80 - Add nallocm(), which rounds a request size up to the nearest size class
81 without actually allocating.
82 - Implement aligned_alloc() (blame C11).
Jason Evans9ef7f5d2012-04-16 18:16:48 -070083 - Add the "thread.tcache.enabled" mallctl.
Jason Evans0b25fe72012-04-17 16:39:33 -070084 - Add the "opt.prof_final" mallctl.
Jason Evans25a000e2012-04-17 15:49:30 -070085 - Update pprof (from gperftools 2.0).
Jason Evanscbb71ca2012-05-11 17:00:20 -070086 - Add the --with-mangling option.
87 - Add the --disable-experimental option.
88 - Add the --disable-munmap option, and make it the default on Linux.
89 - Add the --enable-mremap option, which disables use of mremap(2) by default.
Jason Evans9ef7f5d2012-04-16 18:16:48 -070090
91 Incompatible changes:
92 - Enable stats by default.
93 - Enable fill by default.
94 - Disable lazy locking by default.
95 - Rename the "tcache.flush" mallctl to "thread.tcache.flush".
96 - Rename the "arenas.pagesize" mallctl to "arenas.page".
Jason Evans0b25fe72012-04-17 16:39:33 -070097 - Change the "opt.lg_prof_sample" default from 0 to 19 (1 B to 512 KiB).
98 - Change the "opt.prof_accum" default from true to false.
Jason Evans9ef7f5d2012-04-16 18:16:48 -070099
100 Removed features:
101 - Remove the swap feature, including the "config.swap", "swap.avail",
102 "swap.prezeroed", "swap.nfds", and "swap.fds" mallctls.
103 - Remove highruns statistics, including the
104 "stats.arenas.<i>.bins.<j>.highruns" and
105 "stats.arenas.<i>.lruns.<j>.highruns" mallctls.
106 - As part of small size class refactoring, remove the "opt.lg_[qc]space_max",
107 "arenas.cacheline", "arenas.subpage", "arenas.[tqcs]space_{min,max}", and
108 "arenas.[tqcs]bins" mallctls.
109 - Remove the "arenas.chunksize" mallctl.
110 - Remove the "opt.lg_prof_tcmax" option.
111 - Remove the "opt.lg_prof_bt_max" option.
112 - Remove the "opt.lg_tcache_gc_sweep" option.
113 - Remove the --disable-tiny option, including the "config.tiny" mallctl.
114 - Remove the --enable-dynamic-page-shift configure option.
115 - Remove the --enable-sysv configure option.
116
117 Bug fixes:
Jason Evans9ef7f5d2012-04-16 18:16:48 -0700118 - Fix a statistics-related bug in the "thread.arena" mallctl that could cause
119 invalid statistics and crashes.
Jason Evans079687b2012-04-23 12:49:23 -0700120 - Work around TLS deallocation via free() on Linux. This bug could cause
Jason Evans9ef7f5d2012-04-16 18:16:48 -0700121 write-after-free memory corruption.
Jason Evans52386b22012-04-22 16:00:11 -0700122 - Fix a potential deadlock that could occur during interval- and
123 growth-triggered heap profile dumps.
Jason Evansd8ceef62012-05-10 20:59:39 -0700124 - Fix large calloc() zeroing bugs due to dropping chunk map unzeroed flags.
Jason Evans8f0e0eb2012-04-21 13:33:48 -0700125 - Fix chunk_alloc_dss() to stop claiming memory is zeroed. This bug could
126 cause memory corruption and crashes with --enable-dss specified.
Jason Evans52386b22012-04-22 16:00:11 -0700127 - Fix fork-related bugs that could cause deadlock in children between fork
128 and exec.
Jason Evans9ef7f5d2012-04-16 18:16:48 -0700129 - Fix malloc_stats_print() to honor 'b' and 'l' in the opts parameter.
130 - Fix realloc(p, 0) to act like free(p).
131 - Do not enforce minimum alignment in memalign().
132 - Check for NULL pointer in malloc_usable_size().
Jason Evans52386b22012-04-22 16:00:11 -0700133 - Fix an off-by-one heap profile statistics bug that could be observed in
134 interval- and growth-triggered heap profiles.
Jason Evans6b9ed672012-04-25 13:12:46 -0700135 - Fix the "epoch" mallctl to update cached stats even if the passed in epoch
136 is 0.
Jason Evans9ef7f5d2012-04-16 18:16:48 -0700137 - Fix bin->runcur management to fix a layout policy bug. This bug did not
138 affect correctness.
139 - Fix a bug in choose_arena_hard() that potentially caused more arenas to be
140 initialized than necessary.
141 - Add missing "opt.lg_tcache_max" mallctl implementation.
142 - Use glibc allocator hooks to make mixed allocator usage less likely.
143 - Fix build issues for --disable-tcache.
Jason Evans918d6e22012-04-20 13:42:21 -0700144 - Don't mangle pthread_create() when --with-private-namespace is specified.
Jason Evans9ef7f5d2012-04-16 18:16:48 -0700145
Jason Evansb3bd8852011-11-14 17:12:45 -0800146* 2.2.5 (November 14, 2011)
147
148 Bug fixes:
149 - Fix huge_ralloc() race when using mremap(2). This is a serious bug that
150 could cause memory corruption and/or crashes.
151 - Fix huge_ralloc() to maintain chunk statistics.
152 - Fix malloc_stats_print(..., "a") output.
153
Jason Evansca9ee1a2011-11-05 21:46:23 -0700154* 2.2.4 (November 5, 2011)
155
156 Bug fixes:
157 - Initialize arenas_tsd before using it. This bug existed for 2.2.[0-3], as
158 well as for --disable-tls builds in earlier releases.
159 - Do not assume a 4 KiB page size in test/rallocm.c.
160
Jason Evansc67e4fd2011-08-31 15:19:13 -0700161* 2.2.3 (August 31, 2011)
162
163 This version fixes numerous bugs related to heap profiling.
164
165 Bug fixes:
166 - Fix a prof-related race condition. This bug could cause memory corruption,
167 but only occurred in non-default configurations (prof_accum:false).
168 - Fix off-by-one backtracing issues (make sure that prof_alloc_prep() is
169 excluded from backtraces).
170 - Fix a prof-related bug in realloc() (only triggered by OOM errors).
171 - Fix prof-related bugs in allocm() and rallocm().
172 - Fix prof_tdata_cleanup() for --disable-tls builds.
173 - Fix a relative include path, to fix objdir builds.
174
Jason Evans4c484812011-07-30 16:59:13 -0700175* 2.2.2 (July 30, 2011)
176
177 Bug fixes:
178 - Fix a build error for --disable-tcache.
179 - Fix assertions in arena_purge() (for real this time).
180 - Add the --with-private-namespace option. This is a workaround for symbol
181 conflicts that can inadvertently arise when using static libraries.
182
Jason Evans7d9ebea2011-03-30 15:01:08 -0700183* 2.2.1 (March 30, 2011)
184
185 Bug fixes:
186 - Implement atomic operations for x86/x64. This fixes compilation failures
187 for versions of gcc that are still in wide use.
188 - Fix an assertion in arena_purge().
189
Jason Evans4bcd9872011-03-22 15:30:22 -0700190* 2.2.0 (March 22, 2011)
191
192 This version incorporates several improvements to algorithms and data
193 structures that tend to reduce fragmentation and increase speed.
194
195 New features:
196 - Add the "stats.cactive" mallctl.
197 - Update pprof (from google-perftools 1.7).
198 - Improve backtracing-related configuration logic, and add the
199 --disable-prof-libgcc option.
200
201 Bug fixes:
202 - Change default symbol visibility from "internal", to "hidden", which
203 decreases the overhead of library-internal function calls.
204 - Fix symbol visibility so that it is also set on OS X.
205 - Fix a build dependency regression caused by the introduction of the .pic.o
206 suffix for PIC object files.
207 - Add missing checks for mutex initialization failures.
208 - Don't use libgcc-based backtracing except on x64, where it is known to work.
209 - Fix deadlocks on OS X that were due to memory allocation in
210 pthread_mutex_lock().
211 - Heap profiling-specific fixes:
212 + Fix memory corruption due to integer overflow in small region index
213 computation, when using a small enough sample interval that profiling
214 context pointers are stored in small run headers.
215 + Fix a bootstrap ordering bug that only occurred with TLS disabled.
216 + Fix a rallocm() rsize bug.
217 + Fix error detection bugs for aligned memory allocation.
218
Jason Evans0e4d0d12011-03-14 16:41:03 -0700219* 2.1.3 (March 14, 2011)
220
221 Bug fixes:
222 - Fix a cpp logic regression (due to the "thread.{de,}allocatedp" mallctl fix
223 for OS X in 2.1.2).
224 - Fix a "thread.arena" mallctl bug.
225 - Fix a thread cache stats merging bug.
226
je6e56e5e2011-03-02 11:23:41 -0800227* 2.1.2 (March 2, 2011)
228
229 Bug fixes:
230 - Fix "thread.{de,}allocatedp" mallctl for OS X.
231 - Add missing jemalloc.a to build system.
232
Jason Evans63692862011-02-07 22:48:35 -0800233* 2.1.1 (January 31, 2011)
Jason Evansada55b22011-01-31 20:08:56 -0800234
Jason Evans63692862011-02-07 22:48:35 -0800235 Bug fixes:
Jason Evansada55b22011-01-31 20:08:56 -0800236 - Fix aligned huge reallocation (affected allocm()).
237 - Fix the ALLOCM_LG_ALIGN macro definition.
238 - Fix a heap dumping deadlock.
239 - Fix a "thread.arena" mallctl bug.
240
Jason Evans63692862011-02-07 22:48:35 -0800241* 2.1.0 (December 3, 2010)
Jason Evans0e8d3d22010-12-03 17:02:16 -0800242
243 This version incorporates some optimizations that can't quite be considered
244 bug fixes.
245
246 New features:
247 - Use Linux's mremap(2) for huge object reallocation when possible.
248 - Avoid locking in mallctl*() when possible.
249 - Add the "thread.[de]allocatedp" mallctl's.
250 - Convert the manual page source from roff to DocBook, and generate both roff
251 and HTML manuals.
252
253 Bug fixes:
254 - Fix a crash due to incorrect bootstrap ordering. This only impacted
255 --enable-debug --enable-dss configurations.
256 - Fix a minor statistics bug for mallctl("swap.avail", ...).
257
Jason Evans63692862011-02-07 22:48:35 -0800258* 2.0.1 (October 29, 2010)
Jason Evans53806fe2010-10-29 20:16:39 -0700259
260 Bug fixes:
261 - Fix a race condition in heap profiling that could cause undefined behavior
Jason Evansada55b22011-01-31 20:08:56 -0800262 if "opt.prof_accum" were disabled.
Jason Evans53806fe2010-10-29 20:16:39 -0700263 - Add missing mutex unlocks for some OOM error paths in the heap profiling
264 code.
265 - Fix a compilation error for non-C99 builds.
266
Jason Evans63692862011-02-07 22:48:35 -0800267* 2.0.0 (October 24, 2010)
Jason Evans379f8472010-10-24 16:18:29 -0700268
269 This version focuses on the experimental *allocm() API, and on improved
270 run-time configuration/introspection. Nonetheless, numerous performance
271 improvements are also included.
272
273 New features:
Jason Evansb059a532010-10-24 16:54:40 -0700274 - Implement the experimental {,r,s,d}allocm() API, which provides a superset
275 of the functionality available via malloc(), calloc(), posix_memalign(),
276 realloc(), malloc_usable_size(), and free(). These functions can be used to
277 allocate/reallocate aligned zeroed memory, ask for optional extra memory
278 during reallocation, prevent object movement during reallocation, etc.
279 - Replace JEMALLOC_OPTIONS/JEMALLOC_PROF_PREFIX with MALLOC_CONF, which is
280 more human-readable, and more flexible. For example:
281 JEMALLOC_OPTIONS=AJP
282 is now:
283 MALLOC_CONF=abort:true,fill:true,stats_print:true
284 - Port to Apple OS X. Sponsored by Mozilla.
285 - Make it possible for the application to control thread-->arena mappings via
286 the "thread.arena" mallctl.
287 - Add compile-time support for all TLS-related functionality via pthreads TSD.
288 This is mainly of interest for OS X, which does not support TLS, but has a
289 TSD implementation with similar performance.
290 - Override memalign() and valloc() if they are provided by the system.
291 - Add the "arenas.purge" mallctl, which can be used to synchronously purge all
292 dirty unused pages.
293 - Make cumulative heap profiling data optional, so that it is possible to
294 limit the amount of memory consumed by heap profiling data structures.
295 - Add per thread allocation counters that can be accessed via the
296 "thread.allocated" and "thread.deallocated" mallctls.
Jason Evans379f8472010-10-24 16:18:29 -0700297
298 Incompatible changes:
Jason Evansb059a532010-10-24 16:54:40 -0700299 - Remove JEMALLOC_OPTIONS and malloc_options (see MALLOC_CONF above).
300 - Increase default backtrace depth from 4 to 128 for heap profiling.
301 - Disable interval-based profile dumps by default.
Jason Evans379f8472010-10-24 16:18:29 -0700302
303 Bug fixes:
304 - Remove bad assertions in fork handler functions. These assertions could
305 cause aborts for some combinations of configure settings.
306 - Fix strerror_r() usage to deal with non-standard semantics in GNU libc.
307 - Fix leak context reporting. This bug tended to cause the number of contexts
308 to be underreported (though the reported number of objects and bytes were
309 correct).
310 - Fix a realloc() bug for large in-place growing reallocation. This bug could
311 cause memory corruption, but it was hard to trigger.
312 - Fix an allocation bug for small allocations that could be triggered if
313 multiple threads raced to create a new run of backing pages.
314 - Enhance the heap profiler to trigger samples based on usable size, rather
315 than request size.
316 - Fix a heap profiling bug due to sometimes losing track of requested object
317 size for sampled objects.
318
Jason Evans63692862011-02-07 22:48:35 -0800319* 1.0.3 (August 12, 2010)
Jason Evans379f8472010-10-24 16:18:29 -0700320
321 Bug fixes:
322 - Fix the libunwind-based implementation of stack backtracing (used for heap
323 profiling). This bug could cause zero-length backtraces to be reported.
324 - Add a missing mutex unlock in library initialization code. If multiple
325 threads raced to initialize malloc, some of them could end up permanently
326 blocked.
327
Jason Evans63692862011-02-07 22:48:35 -0800328* 1.0.2 (May 11, 2010)
Jason Evans379f8472010-10-24 16:18:29 -0700329
330 Bug fixes:
331 - Fix junk filling of large objects, which could cause memory corruption.
332 - Add MAP_NORESERVE support for chunk mapping, because otherwise virtual
333 memory limits could cause swap file configuration to fail. Contributed by
334 Jordan DeLong.
335
Jason Evans63692862011-02-07 22:48:35 -0800336* 1.0.1 (April 14, 2010)
Jason Evans379f8472010-10-24 16:18:29 -0700337
338 Bug fixes:
339 - Fix compilation when --enable-fill is specified.
340 - Fix threads-related profiling bugs that affected accuracy and caused memory
341 to be leaked during thread exit.
342 - Fix dirty page purging race conditions that could cause crashes.
343 - Fix crash in tcache flushing code during thread destruction.
344
Jason Evans63692862011-02-07 22:48:35 -0800345* 1.0.0 (April 11, 2010)
Jason Evans379f8472010-10-24 16:18:29 -0700346
347 This release focuses on speed and run-time introspection. Numerous
348 algorithmic improvements make this release substantially faster than its
349 predecessors.
350
351 New features:
352 - Implement autoconf-based configuration system.
353 - Add mallctl*(), for the purposes of introspection and run-time
354 configuration.
355 - Make it possible for the application to manually flush a thread's cache, via
356 the "tcache.flush" mallctl.
357 - Base maximum dirty page count on proportion of active memory.
358 - Compute various addtional run-time statistics, including per size class
359 statistics for large objects.
360 - Expose malloc_stats_print(), which can be called repeatedly by the
361 application.
362 - Simplify the malloc_message() signature to only take one string argument,
363 and incorporate an opaque data pointer argument for use by the application
364 in combination with malloc_stats_print().
365 - Add support for allocation backed by one or more swap files, and allow the
366 application to disable over-commit if swap files are in use.
367 - Implement allocation profiling and leak checking.
368
369 Removed features:
370 - Remove the dynamic arena rebalancing code, since thread-specific caching
371 reduces its utility.
372
373 Bug fixes:
374 - Modify chunk allocation to work when address space layout randomization
375 (ASLR) is in use.
376 - Fix thread cleanup bugs related to TLS destruction.
377 - Handle 0-size allocation requests in posix_memalign().
378 - Fix a chunk leak. The leaked chunks were never touched, so this impacted
379 virtual memory usage, but not physical memory usage.
380
Jason Evans63692862011-02-07 22:48:35 -0800381* linux_2008082[78]a (August 27/28, 2008)
Jason Evans379f8472010-10-24 16:18:29 -0700382
383 These snapshot releases are the simple result of incorporating Linux-specific
384 support into the FreeBSD malloc sources.
385
386--------------------------------------------------------------------------------
387vim:filetype=text:textwidth=80