ChangeLog 16 KB

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