summaryrefslogtreecommitdiffstats
path: root/src/arena.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix bin->runcur management.Jason Evans2012-02-141-62/+72
| | | | | | | Fix an interaction between arena_dissociate_bin_run() and arena_bin_lower_run() that made it possible for bin->runcur to point to a run other than the lowest non-full run. This bug violated jemalloc's layout policy, but did not affect correctness.
* Remove highruns statistics.Jason Evans2012-02-131-29/+0
|
* Make 8-byte tiny size class non-optional.Jason Evans2012-02-131-72/+29
| | | | | | | | | | | When tiny size class support was first added, it was intended to support truly tiny size classes (even 2 bytes). However, this wasn't very useful in practice, so the minimum tiny size class has been limited to sizeof(void *) for a long time now. This is too small to be standards compliant, but other commonly used malloc implementations do not even bother using a 16-byte quantum on systems with vector units (SSE2+, AltiVEC, etc.). As such, it is safe in practice to support an 8-byte tiny size class on 64-bit systems that support 16-byte types.
* Streamline tcache-related malloc/free fast paths.Jason Evans2012-02-131-29/+0
| | | | | | | | | | | tcache_get() is inlined, so do the config_tcache check inside tcache_get() and simplify its callers. Make arena_malloc() an inline function, since it is part of the malloc() fast path. Remove conditional logic that cause build issues if --disable-tcache was specified.
* Remove the swap feature.Jason Evans2012-02-131-2/+3
| | | | | Remove the swap feature, which enabled per application swap files. In practice this feature has not proven itself useful to users.
* Remove magic.Jason Evans2012-02-131-15/+0
| | | | | | Remove structure magic, because 1) it is no longer conditional, and 2) it stopped being very effective at detecting memory corruption several years ago.
* Reduce cpp conditional logic complexity.Jason Evans2012-02-111-438/+300
| | | | | | | | | | | | | | | | | | | | | | Convert configuration-related cpp conditional logic to use static constant variables, e.g.: #ifdef JEMALLOC_DEBUG [...] #endif becomes: if (config_debug) { [...] } The advantage is clearer, more concise code. The main disadvantage is that data structures no longer have conditionally defined fields, so they pay the cost of all fields regardless of whether they are used. In practice, this is only a minor concern; config_stats will go away in an upcoming change, and config_prof is the only other major feature that depends on more than a few special-purpose fields.
* Fix huge_ralloc to maintain chunk statistics.Jason Evans2011-11-111-1/+1
| | | | | Fix huge_ralloc() to properly maintain chunk statistics when using mremap(2).
* Fix two prof-related bugs in rallocm().Jason Evans2011-08-121-0/+1
| | | | | | | Properly handle boundary conditions for sampled region promotion in rallocm(). Prior to this fix, some combinations of 'size' and 'extra' values could cause erroneous behavior. Additionally, size class recording for promoted regions was incorrect.
* Fix assertions in arena_purge().Jason Evans2011-06-131-2/+2
| | | | | | | | Fix assertions in arena_purge() to accurately reflect the constraints in arena_maybe_purge(). There were two bugs here, one of which merely weakened the assertion, and the other of which referred to an uninitialized variable (typo; used npurgatory instead of arena->npurgatory).
* Move repo contents in jemalloc/ to top level.Jason Evans2011-04-011-0/+2703