Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 1 | Following are change highlights associated with official releases. Important |
Jason Evans | be09b81 | 2015-07-07 09:33:22 -0700 | [diff] [blame] | 2 | bug fixes are all mentioned, but some internal enhancements are omitted here for |
| 3 | brevity. Much more detail can be found in the git revision history: |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 4 | |
Jason Evans | b9ec5c9 | 2014-02-25 16:43:51 -0800 | [diff] [blame] | 5 | https://github.com/jemalloc/jemalloc |
| 6 | |
Christopher Ferris | 45e9f66 | 2015-08-21 12:23:06 -0700 | [diff] [blame] | 7 | * 4.0.1 (XXX) |
Jason Evans | 5ef33a9 | 2015-08-19 14:12:05 -0700 | [diff] [blame] | 8 | |
| 9 | Bug fixes: |
Jason Evans | 30949da | 2015-08-25 16:13:59 -0700 | [diff] [blame] | 10 | - Fix arenas_cache_cleanup() and arena_get_hard() to handle |
| 11 | allocation/deallocation within the application's thread-specific data |
| 12 | cleanup functions even after arenas_cache is torn down. |
Jason Evans | 5ef33a9 | 2015-08-19 14:12:05 -0700 | [diff] [blame] | 13 | - Don't bitshift by negative amounts when encoding/decoding run sizes in chunk |
| 14 | header maps. This affected systems with page sizes greater than 8 KiB. |
Jason Evans | d01fd19 | 2015-08-19 15:21:32 -0700 | [diff] [blame] | 15 | - Rename index_t to szind_t to avoid an existing type on Solaris. |
Jason Evans | 5d2e875 | 2015-08-26 13:47:20 -0700 | [diff] [blame] | 16 | - Add JEMALLOC_CXX_THROW to the memalign() function prototype, in order to |
| 17 | match glibc and avoid compilation errors when including both |
| 18 | jemalloc/jemalloc.h and malloc.h in C++ code. |
Mike Hommey | 6d8075f | 2015-08-27 20:30:15 -0700 | [diff] [blame] | 19 | - Fix chunk purge hook calls for in-place huge shrinking reallocation to |
| 20 | specify the old chunk size rather than the new chunk size. This bug caused |
| 21 | no correctness issues for the default chunk purge function, but was |
| 22 | visible to custom functions set via the "arena.<i>.chunk_hooks" mallctl. |
Jason Evans | c0f43b6 | 2015-09-02 12:46:35 -0700 | [diff] [blame] | 23 | - Fix TLS configuration such that it is enabled by default for platforms on |
| 24 | which it works correctly. |
Jason Evans | a00b107 | 2015-09-09 23:16:10 -0700 | [diff] [blame] | 25 | - Fix heap profiling to distinguish among otherwise identical sample sites |
| 26 | with interposed resets (triggered via the "prof.reset" mallctl). This bug |
| 27 | could cause data structure corruption that would most likely result in a |
| 28 | segfault. |
Jason Evans | 560a4e1 | 2015-09-11 16:18:53 -0700 | [diff] [blame^] | 29 | - Fix xallocx() bugs related to the 'extra' parameter when specified as |
| 30 | non-zero. |
Jason Evans | 5ef33a9 | 2015-08-19 14:12:05 -0700 | [diff] [blame] | 31 | |
Jason Evans | 9b68f67 | 2015-08-17 13:21:08 -0700 | [diff] [blame] | 32 | * 4.0.0 (August 17, 2015) |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 33 | |
| 34 | This version contains many speed and space optimizations, both minor and |
| 35 | major. The major themes are generalization, unification, and simplification. |
| 36 | Although many of these optimizations cause no visible behavior change, their |
| 37 | cumulative effect is substantial. |
| 38 | |
| 39 | New features: |
| 40 | - Normalize size class spacing to be consistent across the complete size |
| 41 | range. By default there are four size classes per size doubling, but this |
| 42 | is now configurable via the --with-lg-size-class-group option. Also add the |
| 43 | --with-lg-page, --with-lg-page-sizes, --with-lg-quantum, and |
| 44 | --with-lg-tiny-min options, which can be used to tweak page and size class |
| 45 | settings. Impacts: |
| 46 | + Worst case performance for incrementally growing/shrinking reallocation |
| 47 | is improved because there are far fewer size classes, and therefore |
| 48 | copying happens less often. |
| 49 | + Internal fragmentation is limited to 20% for all but the smallest size |
| 50 | classes (those less than four times the quantum). (1B + 4 KiB) |
| 51 | and (1B + 4 MiB) previously suffered nearly 50% internal fragmentation. |
| 52 | + Chunk fragmentation tends to be lower because there are fewer distinct run |
| 53 | sizes to pack. |
| 54 | - Add support for explicit tcaches. The "tcache.create", "tcache.flush", and |
| 55 | "tcache.destroy" mallctls control tcache lifetime and flushing, and the |
| 56 | MALLOCX_TCACHE(tc) and MALLOCX_TCACHE_NONE flags to the *allocx() API |
| 57 | control which tcache is used for each operation. |
| 58 | - Implement per thread heap profiling, as well as the ability to |
| 59 | enable/disable heap profiling on a per thread basis. Add the "prof.reset", |
| 60 | "prof.lg_sample", "thread.prof.name", "thread.prof.active", |
| 61 | "opt.prof_thread_active_init", "prof.thread_active_init", and |
| 62 | "thread.prof.active" mallctls. |
| 63 | - Add support for per arena application-specified chunk allocators, configured |
Jason Evans | b49a334 | 2015-07-28 11:28:19 -0400 | [diff] [blame] | 64 | via the "arena.<i>.chunk_hooks" mallctl. |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 65 | - Refactor huge allocation to be managed by arenas, so that arenas now |
| 66 | function as general purpose independent allocators. This is important in |
| 67 | the context of user-specified chunk allocators, aside from the scalability |
| 68 | benefits. Related new statistics: |
| 69 | + The "stats.arenas.<i>.huge.allocated", "stats.arenas.<i>.huge.nmalloc", |
| 70 | "stats.arenas.<i>.huge.ndalloc", and "stats.arenas.<i>.huge.nrequests" |
| 71 | mallctls provide high level per arena huge allocation statistics. |
Qinfan Wu | 8975035 | 2015-04-21 16:57:42 -0700 | [diff] [blame] | 72 | + The "arenas.nhchunks", "arenas.hchunk.<i>.size", |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 73 | "stats.arenas.<i>.hchunks.<j>.nmalloc", |
| 74 | "stats.arenas.<i>.hchunks.<j>.ndalloc", |
| 75 | "stats.arenas.<i>.hchunks.<j>.nrequests", and |
| 76 | "stats.arenas.<i>.hchunks.<j>.curhchunks" mallctls provide per size class |
| 77 | statistics. |
| 78 | - Add the 'util' column to malloc_stats_print() output, which reports the |
| 79 | proportion of available regions that are currently in use for each small |
| 80 | size class. |
| 81 | - Add "alloc" and "free" modes for for junk filling (see the "opt.junk" |
| 82 | mallctl), so that it is possible to separately enable junk filling for |
| 83 | allocation versus deallocation. |
| 84 | - Add the jemalloc-config script, which provides information about how |
| 85 | jemalloc was configured, and how to integrate it into application builds. |
| 86 | - Add metadata statistics, which are accessible via the "stats.metadata", |
| 87 | "stats.arenas.<i>.metadata.mapped", and |
| 88 | "stats.arenas.<i>.metadata.allocated" mallctls. |
Jason Evans | 4acd75a | 2015-03-23 17:25:57 -0700 | [diff] [blame] | 89 | - Add the "stats.resident" mallctl, which reports the upper limit of |
| 90 | physically resident memory mapped by the allocator. |
Jason Evans | 562d266 | 2015-03-24 16:36:12 -0700 | [diff] [blame] | 91 | - Add per arena control over unused dirty page purging, via the |
| 92 | "arenas.lg_dirty_mult", "arena.<i>.lg_dirty_mult", and |
| 93 | "stats.arenas.<i>.lg_dirty_mult" mallctls. |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 94 | - Add the "prof.gdump" mallctl, which makes it possible to toggle the gdump |
| 95 | feature on/off during program execution. |
| 96 | - Add sdallocx(), which implements sized deallocation. The primary |
| 97 | optimization over dallocx() is the removal of a metadata read, which often |
| 98 | suffers an L1 cache miss. |
| 99 | - Add missing header includes in jemalloc/jemalloc.h, so that applications |
| 100 | only have to #include <jemalloc/jemalloc.h>. |
| 101 | - Add support for additional platforms: |
| 102 | + Bitrig |
| 103 | + Cygwin |
| 104 | + DragonFlyBSD |
| 105 | + iOS |
| 106 | + OpenBSD |
| 107 | + OpenRISC/or1k |
| 108 | |
| 109 | Optimizations: |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 110 | - Maintain dirty runs in per arena LRUs rather than in per arena trees of |
| 111 | dirty-run-containing chunks. In practice this change significantly reduces |
| 112 | dirty page purging volume. |
| 113 | - Integrate whole chunks into the unused dirty page purging machinery. This |
| 114 | reduces the cost of repeated huge allocation/deallocation, because it |
| 115 | effectively introduces a cache of chunks. |
| 116 | - Split the arena chunk map into two separate arrays, in order to increase |
| 117 | cache locality for the frequently accessed bits. |
| 118 | - Move small run metadata out of runs, into arena chunk headers. This reduces |
| 119 | run fragmentation, smaller runs reduce external fragmentation for small size |
| 120 | classes, and packed (less uniformly aligned) metadata layout improves CPU |
| 121 | cache set distribution. |
Jason Evans | 8a03cf0 | 2015-05-04 09:58:36 -0700 | [diff] [blame] | 122 | - Randomly distribute large allocation base pointer alignment relative to page |
| 123 | boundaries in order to more uniformly utilize CPU cache sets. This can be |
Jason Evans | f2bc852 | 2015-07-17 16:38:25 -0700 | [diff] [blame] | 124 | disabled via the --disable-cache-oblivious configure option, and queried via |
| 125 | the "config.cache_oblivious" mallctl. |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 126 | - Micro-optimize the fast paths for the public API functions. |
| 127 | - Refactor thread-specific data to reside in a single structure. This assures |
| 128 | that only a single TLS read is necessary per call into the public API. |
| 129 | - Implement in-place huge allocation growing and shrinking. |
| 130 | - Refactor rtree (radix tree for chunk lookups) to be lock-free, and make |
| 131 | additional optimizations that reduce maximum lookup depth to one or two |
| 132 | levels. This resolves what was a concurrency bottleneck for per arena huge |
| 133 | allocation, because a global data structure is critical for determining |
| 134 | which arenas own which huge allocations. |
| 135 | |
| 136 | Incompatible changes: |
| 137 | - Replace --enable-cc-silence with --disable-cc-silence to suppress spurious |
| 138 | warnings by default. |
| 139 | - Assure that the constness of malloc_usable_size()'s return type matches that |
| 140 | of the system implementation. |
| 141 | - Change the heap profile dump format to support per thread heap profiling, |
Jason Evans | 7041720 | 2015-05-01 12:31:12 -0700 | [diff] [blame] | 142 | rename pprof to jeprof, and enhance it with the --thread=<n> option. As a |
| 143 | result, the bundled jeprof must now be used rather than the upstream |
| 144 | (gperftools) pprof. |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 145 | - Disable "opt.prof_final" by default, in order to avoid atexit(3), which can |
| 146 | internally deadlock on some platforms. |
| 147 | - Change the "arenas.nlruns" mallctl type from size_t to unsigned. |
| 148 | - Replace the "stats.arenas.<i>.bins.<j>.allocated" mallctl with |
| 149 | "stats.arenas.<i>.bins.<j>.curregs". |
| 150 | - Ignore MALLOC_CONF in set{uid,gid,cap} binaries. |
| 151 | - Ignore MALLOCX_ARENA(a) in dallocx(), in favor of using the |
| 152 | MALLOCX_TCACHE(tc) and MALLOCX_TCACHE_NONE flags to control tcache usage. |
| 153 | |
| 154 | Removed features: |
| 155 | - Remove the *allocm() API, which is superseded by the *allocx() API. |
| 156 | - Remove the --enable-dss options, and make dss non-optional on all platforms |
| 157 | which support sbrk(2). |
| 158 | - Remove the "arenas.purge" mallctl, which was obsoleted by the |
| 159 | "arena.<i>.purge" mallctl in 3.1.0. |
| 160 | - Remove the unnecessary "opt.valgrind" mallctl; jemalloc automatically |
| 161 | detects whether it is running inside Valgrind. |
| 162 | - Remove the "stats.huge.allocated", "stats.huge.nmalloc", and |
| 163 | "stats.huge.ndalloc" mallctls. |
| 164 | - Remove the --enable-mremap option. |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 165 | - Remove the "stats.chunks.current", "stats.chunks.total", and |
| 166 | "stats.chunks.high" mallctls. |
| 167 | |
| 168 | Bug fixes: |
| 169 | - Fix the cactive statistic to decrease (rather than increase) when active |
| 170 | memory decreases. This regression was first released in 3.5.0. |
| 171 | - Fix OOM handling in memalign() and valloc(). A variant of this bug existed |
| 172 | in all releases since 2.0.0, which introduced these functions. |
Jason Evans | 32dca11 | 2015-07-09 11:34:13 -0700 | [diff] [blame] | 173 | - Fix an OOM-related regression in arena_tcache_fill_small(), which could |
| 174 | cause cache corruption on OOM. This regression was present in all releases |
| 175 | from 2.2.0 through 3.6.0. |
Jason Evans | 241abc6 | 2015-06-23 18:47:07 -0700 | [diff] [blame] | 176 | - Fix size class overflow handling for malloc(), posix_memalign(), memalign(), |
| 177 | calloc(), and realloc() when profiling is enabled. |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 178 | - Fix the "arena.<i>.dss" mallctl to return an error if "primary" or |
| 179 | "secondary" precedence is specified, but sbrk(2) is not supported. |
| 180 | - Fix fallback lg_floor() implementations to handle extremely large inputs. |
| 181 | - Ensure the default purgeable zone is after the default zone on OS X. |
| 182 | - Fix latent bugs in atomic_*(). |
| 183 | - Fix the "arena.<i>.dss" mallctl to handle read-only calls. |
| 184 | - Fix tls_model configuration to enable the initial-exec model when possible. |
| 185 | - Mark malloc_conf as a weak symbol so that the application can override it. |
| 186 | - Correctly detect glibc's adaptive pthread mutexes. |
| 187 | - Fix the --without-export configure option. |
| 188 | |
Jason Evans | ff53631 | 2014-03-31 09:23:10 -0700 | [diff] [blame] | 189 | * 3.6.0 (March 31, 2014) |
| 190 | |
| 191 | This version contains a critical bug fix for a regression present in 3.5.0 and |
| 192 | 3.5.1. |
| 193 | |
| 194 | Bug fixes: |
| 195 | - Fix a regression in arena_chunk_alloc() that caused crashes during |
| 196 | small/large allocation if chunk allocation failed. In the absence of this |
| 197 | bug, chunk allocation failure would result in allocation failure, e.g. NULL |
| 198 | return from malloc(). This regression was introduced in 3.5.0. |
| 199 | - Fix backtracing for gcc intrinsics-based backtracing by specifying |
| 200 | -fno-omit-frame-pointer to gcc. Note that the application (and all the |
| 201 | libraries it links to) must also be compiled with this option for |
| 202 | backtracing to be reliable. |
| 203 | - Use dss allocation precedence for huge allocations as well as small/large |
| 204 | allocations. |
Jason Evans | 54673fd | 2015-02-23 22:28:43 -0800 | [diff] [blame] | 205 | - Fix test assertion failure message formatting. This bug did not manifest on |
Jason Evans | ff53631 | 2014-03-31 09:23:10 -0700 | [diff] [blame] | 206 | x86_64 systems because of implementation subtleties in va_list. |
| 207 | - Fix inconsequential test failures for hash and SFMT code. |
| 208 | |
| 209 | New features: |
| 210 | - Support heap profiling on FreeBSD. This feature depends on the proc |
| 211 | filesystem being mounted during heap profile dumping. |
| 212 | |
Jason Evans | b9ec5c9 | 2014-02-25 16:43:51 -0800 | [diff] [blame] | 213 | * 3.5.1 (February 25, 2014) |
| 214 | |
| 215 | This version primarily addresses minor bugs in test code. |
| 216 | |
| 217 | Bug fixes: |
| 218 | - Configure Solaris/Illumos to use MADV_FREE. |
| 219 | - Fix junk filling for mremap(2)-based huge reallocation. This is only |
| 220 | relevant if configuring with the --enable-mremap option specified. |
| 221 | - Avoid compilation failure if 'restrict' C99 keyword is not supported by the |
| 222 | compiler. |
| 223 | - Add a configure test for SSE2 rather than assuming it is usable on i686 |
| 224 | systems. This fixes test compilation errors, especially on 32-bit Linux |
| 225 | systems. |
| 226 | - Fix mallctl argument size mismatches (size_t vs. uint64_t) in the stats unit |
| 227 | test. |
| 228 | - Fix/remove flawed alignment-related overflow tests. |
| 229 | - Prevent compiler optimizations that could change backtraces in the |
| 230 | prof_accum unit test. |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 231 | |
Jason Evans | 798a481 | 2014-01-22 11:09:50 -0800 | [diff] [blame] | 232 | * 3.5.0 (January 22, 2014) |
Jason Evans | 86abd0d | 2013-11-30 15:25:42 -0800 | [diff] [blame] | 233 | |
Jason Evans | 264dfd3 | 2014-01-17 17:01:23 -0800 | [diff] [blame] | 234 | This version focuses on refactoring and automated testing, though it also |
| 235 | includes some non-trivial heap profiling optimizations not mentioned below. |
| 236 | |
| 237 | New features: |
| 238 | - Add the *allocx() API, which is a successor to the experimental *allocm() |
| 239 | API. The *allocx() functions are slightly simpler to use because they have |
| 240 | fewer parameters, they directly return the results of primary interest, and |
| 241 | mallocx()/rallocx() avoid the strict aliasing pitfall that |
Jason Evans | 9c8baec | 2014-01-22 13:08:47 -0800 | [diff] [blame] | 242 | allocm()/rallocm() share with posix_memalign(). Note that *allocm() is |
Jason Evans | 264dfd3 | 2014-01-17 17:01:23 -0800 | [diff] [blame] | 243 | slated for removal in the next non-bugfix release. |
| 244 | - Add support for LinuxThreads. |
| 245 | |
Jason Evans | 86abd0d | 2013-11-30 15:25:42 -0800 | [diff] [blame] | 246 | Bug fixes: |
Jason Evans | d37d5ad | 2013-12-05 23:01:50 -0800 | [diff] [blame] | 247 | - Unless heap profiling is enabled, disable floating point code and don't link |
| 248 | with libm. This, in combination with e.g. EXTRA_CFLAGS=-mno-sse on x64 |
| 249 | systems, makes it possible to completely disable floating point register |
| 250 | use. Some versions of glibc neglect to save/restore caller-saved floating |
| 251 | point registers during dynamic lazy symbol loading, and the symbol loading |
| 252 | code uses whatever malloc the application happens to have linked/loaded |
| 253 | with, the result being potential floating point register corruption. |
Jason Evans | 264dfd3 | 2014-01-17 17:01:23 -0800 | [diff] [blame] | 254 | - Report ENOMEM rather than EINVAL if an OOM occurs during heap profiling |
| 255 | backtrace creation in imemalign(). This bug impacted posix_memalign() and |
| 256 | aligned_alloc(). |
| 257 | - Fix a file descriptor leak in a prof_dump_maps() error path. |
| 258 | - Fix prof_dump() to close the dump file descriptor for all relevant error |
| 259 | paths. |
| 260 | - Fix rallocm() to use the arena specified by the ALLOCM_ARENA(s) flag for |
| 261 | allocation, not just deallocation. |
| 262 | - Fix a data race for large allocation stats counters. |
| 263 | - Fix a potential infinite loop during thread exit. This bug occurred on |
| 264 | Solaris, and could affect other platforms with similar pthreads TSD |
| 265 | implementations. |
| 266 | - Don't junk-fill reallocations unless usable size changes. This fixes a |
| 267 | violation of the *allocx()/*allocm() semantics. |
| 268 | - Fix growing large reallocation to junk fill new space. |
| 269 | - Fix huge deallocation to junk fill when munmap is disabled. |
Jason Evans | 86abd0d | 2013-11-30 15:25:42 -0800 | [diff] [blame] | 270 | - Change the default private namespace prefix from empty to je_, and change |
| 271 | --with-private-namespace-prefix so that it prepends an additional prefix |
| 272 | rather than replacing je_. This reduces the likelihood of applications |
| 273 | which statically link jemalloc experiencing symbol name collisions. |
Jason Evans | 264dfd3 | 2014-01-17 17:01:23 -0800 | [diff] [blame] | 274 | - Add missing private namespace mangling (relevant when |
| 275 | --with-private-namespace is specified). |
| 276 | - Add and use JEMALLOC_INLINE_C so that static inline functions are marked as |
| 277 | static even for debug builds. |
| 278 | - Add a missing mutex unlock in a malloc_init_hard() error path. In practice |
| 279 | this error path is never executed. |
| 280 | - Fix numerous bugs in malloc_strotumax() error handling/reporting. These |
| 281 | bugs had no impact except for malformed inputs. |
| 282 | - Fix numerous bugs in malloc_snprintf(). These bugs were not exercised by |
| 283 | existing calls, so they had no impact. |
Jason Evans | 86abd0d | 2013-11-30 15:25:42 -0800 | [diff] [blame] | 284 | |
Jason Evans | 0f7ba3f | 2013-10-20 19:40:09 -0700 | [diff] [blame] | 285 | * 3.4.1 (October 20, 2013) |
Jason Evans | ff08ef7 | 2013-10-19 21:41:10 -0700 | [diff] [blame] | 286 | |
| 287 | Bug fixes: |
Jason Evans | 7b65180 | 2013-10-20 14:09:54 -0700 | [diff] [blame] | 288 | - Fix a race in the "arenas.extend" mallctl that could cause memory corruption |
| 289 | of internal data structures and subsequent crashes. |
Jason Evans | dda90f5 | 2013-10-19 23:48:40 -0700 | [diff] [blame] | 290 | - Fix Valgrind integration flaws that caused Valgrind warnings about reads of |
| 291 | uninitialized memory in: |
| 292 | + arena chunk headers |
| 293 | + internal zero-initialized data structures (relevant to tcache and prof |
| 294 | code) |
Jason Evans | ff08ef7 | 2013-10-19 21:41:10 -0700 | [diff] [blame] | 295 | - Preserve errno during the first allocation. A readlink(2) call during |
| 296 | initialization fails unless /etc/malloc.conf exists, so errno was typically |
| 297 | set during the first allocation prior to this fix. |
| 298 | - Fix compilation warnings reported by gcc 4.8.1. |
| 299 | |
Jason Evans | 765cc2b | 2013-06-02 20:58:00 -0700 | [diff] [blame] | 300 | * 3.4.0 (June 2, 2013) |
| 301 | |
| 302 | This version is essentially a small bugfix release, but the addition of |
| 303 | aarch64 support requires that the minor version be incremented. |
| 304 | |
| 305 | Bug fixes: |
| 306 | - Fix race-triggered deadlocks in chunk_record(). These deadlocks were |
| 307 | typically triggered by multiple threads concurrently deallocating huge |
| 308 | objects. |
| 309 | |
| 310 | New features: |
| 311 | - Add support for the aarch64 architecture. |
| 312 | |
Jason Evans | 2298835 | 2013-03-06 11:11:17 -0800 | [diff] [blame] | 313 | * 3.3.1 (March 6, 2013) |
| 314 | |
| 315 | This version fixes bugs that are typically encountered only when utilizing |
| 316 | custom run-time options. |
Jason Evans | bbe29d3 | 2013-01-30 15:03:11 -0800 | [diff] [blame] | 317 | |
| 318 | Bug fixes: |
Jason Evans | 88c222c | 2013-02-06 11:59:30 -0800 | [diff] [blame] | 319 | - Fix a locking order bug that could cause deadlock during fork if heap |
| 320 | profiling were enabled. |
Jason Evans | a7a28c3 | 2013-01-31 16:53:58 -0800 | [diff] [blame] | 321 | - Fix a chunk recycling bug that could cause the allocator to lose track of |
Jason Evans | 765cc2b | 2013-06-02 20:58:00 -0700 | [diff] [blame] | 322 | whether a chunk was zeroed. On FreeBSD, NetBSD, and OS X, it could cause |
Jason Evans | a7a28c3 | 2013-01-31 16:53:58 -0800 | [diff] [blame] | 323 | corruption if allocating via sbrk(2) (unlikely unless running with the |
| 324 | "dss:primary" option specified). This was completely harmless on Linux |
| 325 | unless using mlockall(2) (and unlikely even then, unless the |
| 326 | --disable-munmap configure option or the "dss:primary" option was |
| 327 | specified). This regression was introduced in 3.1.0 by the |
| 328 | mlockall(2)/madvise(2) interaction fix. |
Jason Evans | bbe29d3 | 2013-01-30 15:03:11 -0800 | [diff] [blame] | 329 | - Fix TLS-related memory corruption that could occur during thread exit if the |
| 330 | thread never allocated memory. Only the quarantine and prof facilities were |
| 331 | susceptible. |
Jason Evans | d0e942e | 2013-01-31 14:42:41 -0800 | [diff] [blame] | 332 | - Fix two quarantine bugs: |
| 333 | + Internal reallocation of the quarantined object array leaked the old |
| 334 | array. |
| 335 | + Reallocation failure for internal reallocation of the quarantined object |
| 336 | array (very unlikely) resulted in memory corruption. |
Jason Evans | 0691275 | 2013-01-31 17:02:53 -0800 | [diff] [blame] | 337 | - Fix Valgrind integration to annotate all internally allocated memory in a |
| 338 | way that keeps Valgrind happy about internal data structure access. |
Jason Evans | 2298835 | 2013-03-06 11:11:17 -0800 | [diff] [blame] | 339 | - Fix building for s390 systems. |
Jason Evans | bbe29d3 | 2013-01-30 15:03:11 -0800 | [diff] [blame] | 340 | |
Jason Evans | b5681fb | 2013-01-22 22:45:09 -0800 | [diff] [blame] | 341 | * 3.3.0 (January 23, 2013) |
| 342 | |
| 343 | This version includes a few minor performance improvements in addition to the |
| 344 | listed new features and bug fixes. |
| 345 | |
| 346 | New features: |
| 347 | - Add clipping support to lg_chunk option processing. |
| 348 | - Add the --enable-ivsalloc option. |
| 349 | - Add the --without-export option. |
| 350 | - Add the --disable-zone-allocator option. |
Jason Evans | 6eb84fb | 2012-11-29 22:13:04 -0800 | [diff] [blame] | 351 | |
| 352 | Bug fixes: |
| 353 | - Fix "arenas.extend" mallctl to output the number of arenas. |
Jason Evans | a33488d | 2013-10-03 14:38:39 -0700 | [diff] [blame] | 354 | - Fix chunk_recycle() to unconditionally inform Valgrind that returned memory |
Jason Evans | 1271185 | 2012-12-12 10:12:18 -0800 | [diff] [blame] | 355 | is undefined. |
Jason Evans | b5681fb | 2013-01-22 22:45:09 -0800 | [diff] [blame] | 356 | - Fix build break on FreeBSD related to alloca.h. |
Jason Evans | 6eb84fb | 2012-11-29 22:13:04 -0800 | [diff] [blame] | 357 | |
Jason Evans | 556ddc7 | 2012-11-07 15:16:29 -0800 | [diff] [blame] | 358 | * 3.2.0 (November 9, 2012) |
| 359 | |
| 360 | In addition to a couple of bug fixes, this version modifies page run |
| 361 | allocation and dirty page purging algorithms in order to better control |
| 362 | page-level virtual memory fragmentation. |
Jason Evans | 12efefb | 2012-10-16 22:06:56 -0700 | [diff] [blame] | 363 | |
Jason Evans | e3d1306 | 2012-10-30 15:42:37 -0700 | [diff] [blame] | 364 | Incompatible changes: |
Jason Evans | 556ddc7 | 2012-11-07 15:16:29 -0800 | [diff] [blame] | 365 | - Change the "opt.lg_dirty_mult" default from 5 to 3 (32:1 to 8:1). |
Jason Evans | e3d1306 | 2012-10-30 15:42:37 -0700 | [diff] [blame] | 366 | |
Jason Evans | 12efefb | 2012-10-16 22:06:56 -0700 | [diff] [blame] | 367 | Bug fixes: |
| 368 | - Fix dss/mmap allocation precedence code to use recyclable mmap memory only |
| 369 | after primary dss allocation fails. |
Jason Evans | e3d1306 | 2012-10-30 15:42:37 -0700 | [diff] [blame] | 370 | - Fix deadlock in the "arenas.purge" mallctl. This regression was introduced |
| 371 | in 3.1.0 by the addition of the "arena.<i>.purge" mallctl. |
Jason Evans | 12efefb | 2012-10-16 22:06:56 -0700 | [diff] [blame] | 372 | |
Jason Evans | 2b592b0 | 2012-10-16 10:12:40 -0700 | [diff] [blame] | 373 | * 3.1.0 (October 16, 2012) |
Jason Evans | 3860eac | 2012-05-15 13:53:21 -0700 | [diff] [blame] | 374 | |
Jason Evans | 781fe75 | 2012-05-15 14:48:14 -0700 | [diff] [blame] | 375 | New features: |
| 376 | - Auto-detect whether running inside Valgrind, thus removing the need to |
| 377 | manually specify MALLOC_CONF=valgrind:true. |
Jason Evans | 2b592b0 | 2012-10-16 10:12:40 -0700 | [diff] [blame] | 378 | - Add the "arenas.extend" mallctl, which allows applications to create |
| 379 | manually managed arenas. |
| 380 | - Add the ALLOCM_ARENA() flag for {,r,d}allocm(). |
| 381 | - Add the "opt.dss", "arena.<i>.dss", and "stats.arenas.<i>.dss" mallctls, |
| 382 | which provide control over dss/mmap precedence. |
| 383 | - Add the "arena.<i>.purge" mallctl, which obsoletes "arenas.purge". |
| 384 | - Define LG_QUANTUM for hppa. |
Jason Evans | 781fe75 | 2012-05-15 14:48:14 -0700 | [diff] [blame] | 385 | |
Jason Evans | 174b70e | 2012-05-15 23:31:53 -0700 | [diff] [blame] | 386 | Incompatible changes: |
| 387 | - Disable tcache by default if running inside Valgrind, in order to avoid |
| 388 | making unallocated objects appear reachable to Valgrind. |
Jason Evans | 2b592b0 | 2012-10-16 10:12:40 -0700 | [diff] [blame] | 389 | - Drop const from malloc_usable_size() argument on Linux. |
Jason Evans | 174b70e | 2012-05-15 23:31:53 -0700 | [diff] [blame] | 390 | |
Jason Evans | 3860eac | 2012-05-15 13:53:21 -0700 | [diff] [blame] | 391 | Bug fixes: |
| 392 | - Fix heap profiling crash if sampled object is freed via realloc(p, 0). |
Jason Evans | 5c710ce | 2012-05-23 16:09:22 -0700 | [diff] [blame] | 393 | - Remove const from __*_hook variable declarations, so that glibc can modify |
| 394 | them during process forking. |
Jason Evans | 2b592b0 | 2012-10-16 10:12:40 -0700 | [diff] [blame] | 395 | - Fix mlockall(2)/madvise(2) interaction. |
| 396 | - Fix fork(2)-related deadlocks. |
| 397 | - Fix error return value for "thread.tcache.enabled" mallctl. |
Jason Evans | 3860eac | 2012-05-15 13:53:21 -0700 | [diff] [blame] | 398 | |
Jason Evans | cbb71ca | 2012-05-11 17:00:20 -0700 | [diff] [blame] | 399 | * 3.0.0 (May 11, 2012) |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 400 | |
| 401 | Although this version adds some major new features, the primary focus is on |
| 402 | internal code cleanup that facilitates maintainability and portability, most |
| 403 | of which is not reflected in the ChangeLog. This is the first release to |
| 404 | incorporate substantial contributions from numerous other developers, and the |
| 405 | result is a more broadly useful allocator (see the git revision history for |
| 406 | contribution details). Note that the license has been unified, thanks to |
| 407 | Facebook granting a license under the same terms as the other copyright |
| 408 | holders (see COPYING). |
| 409 | |
| 410 | New features: |
| 411 | - Implement Valgrind support, redzones, and quarantine. |
Jason Evans | 079687b | 2012-04-23 12:49:23 -0700 | [diff] [blame] | 412 | - Add support for additional platforms: |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 413 | + FreeBSD |
| 414 | + Mac OS X Lion |
Jason Evans | 40f514f | 2012-04-22 16:21:06 -0700 | [diff] [blame] | 415 | + MinGW |
Jason Evans | cbb71ca | 2012-05-11 17:00:20 -0700 | [diff] [blame] | 416 | + Windows (no support yet for replacing the system malloc) |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 417 | - Add support for additional architectures: |
| 418 | + MIPS |
| 419 | + SH4 |
| 420 | + Tilera |
| 421 | - Add support for cross compiling. |
| 422 | - Add nallocm(), which rounds a request size up to the nearest size class |
| 423 | without actually allocating. |
| 424 | - Implement aligned_alloc() (blame C11). |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 425 | - Add the "thread.tcache.enabled" mallctl. |
Jason Evans | 0b25fe7 | 2012-04-17 16:39:33 -0700 | [diff] [blame] | 426 | - Add the "opt.prof_final" mallctl. |
Jason Evans | 25a000e | 2012-04-17 15:49:30 -0700 | [diff] [blame] | 427 | - Update pprof (from gperftools 2.0). |
Jason Evans | cbb71ca | 2012-05-11 17:00:20 -0700 | [diff] [blame] | 428 | - Add the --with-mangling option. |
| 429 | - Add the --disable-experimental option. |
| 430 | - Add the --disable-munmap option, and make it the default on Linux. |
| 431 | - Add the --enable-mremap option, which disables use of mremap(2) by default. |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 432 | |
| 433 | Incompatible changes: |
| 434 | - Enable stats by default. |
| 435 | - Enable fill by default. |
| 436 | - Disable lazy locking by default. |
| 437 | - Rename the "tcache.flush" mallctl to "thread.tcache.flush". |
| 438 | - Rename the "arenas.pagesize" mallctl to "arenas.page". |
Jason Evans | 0b25fe7 | 2012-04-17 16:39:33 -0700 | [diff] [blame] | 439 | - Change the "opt.lg_prof_sample" default from 0 to 19 (1 B to 512 KiB). |
| 440 | - Change the "opt.prof_accum" default from true to false. |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 441 | |
| 442 | Removed features: |
| 443 | - Remove the swap feature, including the "config.swap", "swap.avail", |
| 444 | "swap.prezeroed", "swap.nfds", and "swap.fds" mallctls. |
| 445 | - Remove highruns statistics, including the |
| 446 | "stats.arenas.<i>.bins.<j>.highruns" and |
| 447 | "stats.arenas.<i>.lruns.<j>.highruns" mallctls. |
| 448 | - As part of small size class refactoring, remove the "opt.lg_[qc]space_max", |
| 449 | "arenas.cacheline", "arenas.subpage", "arenas.[tqcs]space_{min,max}", and |
| 450 | "arenas.[tqcs]bins" mallctls. |
| 451 | - Remove the "arenas.chunksize" mallctl. |
| 452 | - Remove the "opt.lg_prof_tcmax" option. |
| 453 | - Remove the "opt.lg_prof_bt_max" option. |
| 454 | - Remove the "opt.lg_tcache_gc_sweep" option. |
| 455 | - Remove the --disable-tiny option, including the "config.tiny" mallctl. |
| 456 | - Remove the --enable-dynamic-page-shift configure option. |
| 457 | - Remove the --enable-sysv configure option. |
| 458 | |
| 459 | Bug fixes: |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 460 | - Fix a statistics-related bug in the "thread.arena" mallctl that could cause |
| 461 | invalid statistics and crashes. |
Jason Evans | 079687b | 2012-04-23 12:49:23 -0700 | [diff] [blame] | 462 | - Work around TLS deallocation via free() on Linux. This bug could cause |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 463 | write-after-free memory corruption. |
Jason Evans | 52386b2 | 2012-04-22 16:00:11 -0700 | [diff] [blame] | 464 | - Fix a potential deadlock that could occur during interval- and |
| 465 | growth-triggered heap profile dumps. |
Jason Evans | d8ceef6 | 2012-05-10 20:59:39 -0700 | [diff] [blame] | 466 | - Fix large calloc() zeroing bugs due to dropping chunk map unzeroed flags. |
Jason Evans | 8f0e0eb | 2012-04-21 13:33:48 -0700 | [diff] [blame] | 467 | - Fix chunk_alloc_dss() to stop claiming memory is zeroed. This bug could |
| 468 | cause memory corruption and crashes with --enable-dss specified. |
Jason Evans | 52386b2 | 2012-04-22 16:00:11 -0700 | [diff] [blame] | 469 | - Fix fork-related bugs that could cause deadlock in children between fork |
| 470 | and exec. |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 471 | - Fix malloc_stats_print() to honor 'b' and 'l' in the opts parameter. |
| 472 | - Fix realloc(p, 0) to act like free(p). |
| 473 | - Do not enforce minimum alignment in memalign(). |
| 474 | - Check for NULL pointer in malloc_usable_size(). |
Jason Evans | 52386b2 | 2012-04-22 16:00:11 -0700 | [diff] [blame] | 475 | - Fix an off-by-one heap profile statistics bug that could be observed in |
| 476 | interval- and growth-triggered heap profiles. |
Jason Evans | 6b9ed67 | 2012-04-25 13:12:46 -0700 | [diff] [blame] | 477 | - Fix the "epoch" mallctl to update cached stats even if the passed in epoch |
| 478 | is 0. |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 479 | - Fix bin->runcur management to fix a layout policy bug. This bug did not |
| 480 | affect correctness. |
| 481 | - Fix a bug in choose_arena_hard() that potentially caused more arenas to be |
| 482 | initialized than necessary. |
| 483 | - Add missing "opt.lg_tcache_max" mallctl implementation. |
| 484 | - Use glibc allocator hooks to make mixed allocator usage less likely. |
| 485 | - Fix build issues for --disable-tcache. |
Jason Evans | 918d6e2 | 2012-04-20 13:42:21 -0700 | [diff] [blame] | 486 | - Don't mangle pthread_create() when --with-private-namespace is specified. |
Jason Evans | 9ef7f5d | 2012-04-16 18:16:48 -0700 | [diff] [blame] | 487 | |
Jason Evans | b3bd885 | 2011-11-14 17:12:45 -0800 | [diff] [blame] | 488 | * 2.2.5 (November 14, 2011) |
| 489 | |
| 490 | Bug fixes: |
| 491 | - Fix huge_ralloc() race when using mremap(2). This is a serious bug that |
| 492 | could cause memory corruption and/or crashes. |
| 493 | - Fix huge_ralloc() to maintain chunk statistics. |
| 494 | - Fix malloc_stats_print(..., "a") output. |
| 495 | |
Jason Evans | ca9ee1a | 2011-11-05 21:46:23 -0700 | [diff] [blame] | 496 | * 2.2.4 (November 5, 2011) |
| 497 | |
| 498 | Bug fixes: |
| 499 | - Initialize arenas_tsd before using it. This bug existed for 2.2.[0-3], as |
| 500 | well as for --disable-tls builds in earlier releases. |
| 501 | - Do not assume a 4 KiB page size in test/rallocm.c. |
| 502 | |
Jason Evans | c67e4fd | 2011-08-31 15:19:13 -0700 | [diff] [blame] | 503 | * 2.2.3 (August 31, 2011) |
| 504 | |
| 505 | This version fixes numerous bugs related to heap profiling. |
| 506 | |
| 507 | Bug fixes: |
| 508 | - Fix a prof-related race condition. This bug could cause memory corruption, |
| 509 | but only occurred in non-default configurations (prof_accum:false). |
| 510 | - Fix off-by-one backtracing issues (make sure that prof_alloc_prep() is |
| 511 | excluded from backtraces). |
| 512 | - Fix a prof-related bug in realloc() (only triggered by OOM errors). |
| 513 | - Fix prof-related bugs in allocm() and rallocm(). |
| 514 | - Fix prof_tdata_cleanup() for --disable-tls builds. |
| 515 | - Fix a relative include path, to fix objdir builds. |
| 516 | |
Jason Evans | 4c48481 | 2011-07-30 16:59:13 -0700 | [diff] [blame] | 517 | * 2.2.2 (July 30, 2011) |
| 518 | |
| 519 | Bug fixes: |
| 520 | - Fix a build error for --disable-tcache. |
| 521 | - Fix assertions in arena_purge() (for real this time). |
| 522 | - Add the --with-private-namespace option. This is a workaround for symbol |
| 523 | conflicts that can inadvertently arise when using static libraries. |
| 524 | |
Jason Evans | 7d9ebea | 2011-03-30 15:01:08 -0700 | [diff] [blame] | 525 | * 2.2.1 (March 30, 2011) |
| 526 | |
| 527 | Bug fixes: |
| 528 | - Implement atomic operations for x86/x64. This fixes compilation failures |
| 529 | for versions of gcc that are still in wide use. |
| 530 | - Fix an assertion in arena_purge(). |
| 531 | |
Jason Evans | 4bcd987 | 2011-03-22 15:30:22 -0700 | [diff] [blame] | 532 | * 2.2.0 (March 22, 2011) |
| 533 | |
| 534 | This version incorporates several improvements to algorithms and data |
| 535 | structures that tend to reduce fragmentation and increase speed. |
| 536 | |
| 537 | New features: |
| 538 | - Add the "stats.cactive" mallctl. |
| 539 | - Update pprof (from google-perftools 1.7). |
| 540 | - Improve backtracing-related configuration logic, and add the |
| 541 | --disable-prof-libgcc option. |
| 542 | |
| 543 | Bug fixes: |
| 544 | - Change default symbol visibility from "internal", to "hidden", which |
| 545 | decreases the overhead of library-internal function calls. |
| 546 | - Fix symbol visibility so that it is also set on OS X. |
| 547 | - Fix a build dependency regression caused by the introduction of the .pic.o |
| 548 | suffix for PIC object files. |
| 549 | - Add missing checks for mutex initialization failures. |
| 550 | - Don't use libgcc-based backtracing except on x64, where it is known to work. |
| 551 | - Fix deadlocks on OS X that were due to memory allocation in |
| 552 | pthread_mutex_lock(). |
| 553 | - Heap profiling-specific fixes: |
| 554 | + Fix memory corruption due to integer overflow in small region index |
| 555 | computation, when using a small enough sample interval that profiling |
| 556 | context pointers are stored in small run headers. |
| 557 | + Fix a bootstrap ordering bug that only occurred with TLS disabled. |
| 558 | + Fix a rallocm() rsize bug. |
| 559 | + Fix error detection bugs for aligned memory allocation. |
| 560 | |
Jason Evans | 0e4d0d1 | 2011-03-14 16:41:03 -0700 | [diff] [blame] | 561 | * 2.1.3 (March 14, 2011) |
| 562 | |
| 563 | Bug fixes: |
| 564 | - Fix a cpp logic regression (due to the "thread.{de,}allocatedp" mallctl fix |
| 565 | for OS X in 2.1.2). |
| 566 | - Fix a "thread.arena" mallctl bug. |
| 567 | - Fix a thread cache stats merging bug. |
| 568 | |
je | 6e56e5e | 2011-03-02 11:23:41 -0800 | [diff] [blame] | 569 | * 2.1.2 (March 2, 2011) |
| 570 | |
| 571 | Bug fixes: |
| 572 | - Fix "thread.{de,}allocatedp" mallctl for OS X. |
| 573 | - Add missing jemalloc.a to build system. |
| 574 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 575 | * 2.1.1 (January 31, 2011) |
Jason Evans | ada55b2 | 2011-01-31 20:08:56 -0800 | [diff] [blame] | 576 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 577 | Bug fixes: |
Jason Evans | ada55b2 | 2011-01-31 20:08:56 -0800 | [diff] [blame] | 578 | - Fix aligned huge reallocation (affected allocm()). |
| 579 | - Fix the ALLOCM_LG_ALIGN macro definition. |
| 580 | - Fix a heap dumping deadlock. |
| 581 | - Fix a "thread.arena" mallctl bug. |
| 582 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 583 | * 2.1.0 (December 3, 2010) |
Jason Evans | 0e8d3d2 | 2010-12-03 17:02:16 -0800 | [diff] [blame] | 584 | |
| 585 | This version incorporates some optimizations that can't quite be considered |
| 586 | bug fixes. |
| 587 | |
| 588 | New features: |
| 589 | - Use Linux's mremap(2) for huge object reallocation when possible. |
| 590 | - Avoid locking in mallctl*() when possible. |
| 591 | - Add the "thread.[de]allocatedp" mallctl's. |
| 592 | - Convert the manual page source from roff to DocBook, and generate both roff |
| 593 | and HTML manuals. |
| 594 | |
| 595 | Bug fixes: |
| 596 | - Fix a crash due to incorrect bootstrap ordering. This only impacted |
| 597 | --enable-debug --enable-dss configurations. |
| 598 | - Fix a minor statistics bug for mallctl("swap.avail", ...). |
| 599 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 600 | * 2.0.1 (October 29, 2010) |
Jason Evans | 53806fe | 2010-10-29 20:16:39 -0700 | [diff] [blame] | 601 | |
| 602 | Bug fixes: |
| 603 | - Fix a race condition in heap profiling that could cause undefined behavior |
Jason Evans | ada55b2 | 2011-01-31 20:08:56 -0800 | [diff] [blame] | 604 | if "opt.prof_accum" were disabled. |
Jason Evans | 53806fe | 2010-10-29 20:16:39 -0700 | [diff] [blame] | 605 | - Add missing mutex unlocks for some OOM error paths in the heap profiling |
| 606 | code. |
| 607 | - Fix a compilation error for non-C99 builds. |
| 608 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 609 | * 2.0.0 (October 24, 2010) |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 610 | |
| 611 | This version focuses on the experimental *allocm() API, and on improved |
| 612 | run-time configuration/introspection. Nonetheless, numerous performance |
| 613 | improvements are also included. |
| 614 | |
| 615 | New features: |
Jason Evans | b059a53 | 2010-10-24 16:54:40 -0700 | [diff] [blame] | 616 | - Implement the experimental {,r,s,d}allocm() API, which provides a superset |
| 617 | of the functionality available via malloc(), calloc(), posix_memalign(), |
| 618 | realloc(), malloc_usable_size(), and free(). These functions can be used to |
| 619 | allocate/reallocate aligned zeroed memory, ask for optional extra memory |
| 620 | during reallocation, prevent object movement during reallocation, etc. |
| 621 | - Replace JEMALLOC_OPTIONS/JEMALLOC_PROF_PREFIX with MALLOC_CONF, which is |
| 622 | more human-readable, and more flexible. For example: |
| 623 | JEMALLOC_OPTIONS=AJP |
| 624 | is now: |
| 625 | MALLOC_CONF=abort:true,fill:true,stats_print:true |
| 626 | - Port to Apple OS X. Sponsored by Mozilla. |
| 627 | - Make it possible for the application to control thread-->arena mappings via |
| 628 | the "thread.arena" mallctl. |
| 629 | - Add compile-time support for all TLS-related functionality via pthreads TSD. |
| 630 | This is mainly of interest for OS X, which does not support TLS, but has a |
| 631 | TSD implementation with similar performance. |
| 632 | - Override memalign() and valloc() if they are provided by the system. |
| 633 | - Add the "arenas.purge" mallctl, which can be used to synchronously purge all |
| 634 | dirty unused pages. |
| 635 | - Make cumulative heap profiling data optional, so that it is possible to |
| 636 | limit the amount of memory consumed by heap profiling data structures. |
| 637 | - Add per thread allocation counters that can be accessed via the |
| 638 | "thread.allocated" and "thread.deallocated" mallctls. |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 639 | |
| 640 | Incompatible changes: |
Jason Evans | b059a53 | 2010-10-24 16:54:40 -0700 | [diff] [blame] | 641 | - Remove JEMALLOC_OPTIONS and malloc_options (see MALLOC_CONF above). |
| 642 | - Increase default backtrace depth from 4 to 128 for heap profiling. |
| 643 | - Disable interval-based profile dumps by default. |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 644 | |
| 645 | Bug fixes: |
| 646 | - Remove bad assertions in fork handler functions. These assertions could |
| 647 | cause aborts for some combinations of configure settings. |
| 648 | - Fix strerror_r() usage to deal with non-standard semantics in GNU libc. |
| 649 | - Fix leak context reporting. This bug tended to cause the number of contexts |
| 650 | to be underreported (though the reported number of objects and bytes were |
| 651 | correct). |
| 652 | - Fix a realloc() bug for large in-place growing reallocation. This bug could |
| 653 | cause memory corruption, but it was hard to trigger. |
| 654 | - Fix an allocation bug for small allocations that could be triggered if |
| 655 | multiple threads raced to create a new run of backing pages. |
| 656 | - Enhance the heap profiler to trigger samples based on usable size, rather |
| 657 | than request size. |
| 658 | - Fix a heap profiling bug due to sometimes losing track of requested object |
| 659 | size for sampled objects. |
| 660 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 661 | * 1.0.3 (August 12, 2010) |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 662 | |
| 663 | Bug fixes: |
| 664 | - Fix the libunwind-based implementation of stack backtracing (used for heap |
| 665 | profiling). This bug could cause zero-length backtraces to be reported. |
| 666 | - Add a missing mutex unlock in library initialization code. If multiple |
| 667 | threads raced to initialize malloc, some of them could end up permanently |
| 668 | blocked. |
| 669 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 670 | * 1.0.2 (May 11, 2010) |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 671 | |
| 672 | Bug fixes: |
| 673 | - Fix junk filling of large objects, which could cause memory corruption. |
| 674 | - Add MAP_NORESERVE support for chunk mapping, because otherwise virtual |
| 675 | memory limits could cause swap file configuration to fail. Contributed by |
| 676 | Jordan DeLong. |
| 677 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 678 | * 1.0.1 (April 14, 2010) |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 679 | |
| 680 | Bug fixes: |
| 681 | - Fix compilation when --enable-fill is specified. |
| 682 | - Fix threads-related profiling bugs that affected accuracy and caused memory |
| 683 | to be leaked during thread exit. |
| 684 | - Fix dirty page purging race conditions that could cause crashes. |
| 685 | - Fix crash in tcache flushing code during thread destruction. |
| 686 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 687 | * 1.0.0 (April 11, 2010) |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 688 | |
| 689 | This release focuses on speed and run-time introspection. Numerous |
| 690 | algorithmic improvements make this release substantially faster than its |
| 691 | predecessors. |
| 692 | |
| 693 | New features: |
| 694 | - Implement autoconf-based configuration system. |
| 695 | - Add mallctl*(), for the purposes of introspection and run-time |
| 696 | configuration. |
| 697 | - Make it possible for the application to manually flush a thread's cache, via |
| 698 | the "tcache.flush" mallctl. |
| 699 | - Base maximum dirty page count on proportion of active memory. |
charsyam | ad6800f | 2015-07-04 01:06:06 +0900 | [diff] [blame] | 700 | - Compute various additional run-time statistics, including per size class |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 701 | statistics for large objects. |
| 702 | - Expose malloc_stats_print(), which can be called repeatedly by the |
| 703 | application. |
| 704 | - Simplify the malloc_message() signature to only take one string argument, |
| 705 | and incorporate an opaque data pointer argument for use by the application |
| 706 | in combination with malloc_stats_print(). |
| 707 | - Add support for allocation backed by one or more swap files, and allow the |
| 708 | application to disable over-commit if swap files are in use. |
| 709 | - Implement allocation profiling and leak checking. |
| 710 | |
| 711 | Removed features: |
| 712 | - Remove the dynamic arena rebalancing code, since thread-specific caching |
| 713 | reduces its utility. |
| 714 | |
| 715 | Bug fixes: |
| 716 | - Modify chunk allocation to work when address space layout randomization |
| 717 | (ASLR) is in use. |
| 718 | - Fix thread cleanup bugs related to TLS destruction. |
| 719 | - Handle 0-size allocation requests in posix_memalign(). |
| 720 | - Fix a chunk leak. The leaked chunks were never touched, so this impacted |
| 721 | virtual memory usage, but not physical memory usage. |
| 722 | |
Jason Evans | 6369286 | 2011-02-07 22:48:35 -0800 | [diff] [blame] | 723 | * linux_2008082[78]a (August 27/28, 2008) |
Jason Evans | 379f847 | 2010-10-24 16:18:29 -0700 | [diff] [blame] | 724 | |
| 725 | These snapshot releases are the simple result of incorporating Linux-specific |
| 726 | support into the FreeBSD malloc sources. |
| 727 | |
| 728 | -------------------------------------------------------------------------------- |
| 729 | vim:filetype=text:textwidth=80 |