summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix a prof-related race condition.Jason Evans2011-08-311-6/+19
| | | | | | | | Fix prof_lookup() to artificially raise curobjs for all paths through the code that creates a new entry in the per thread bt2cnt hash table. This fixes a race condition that could corrupt memory if prof_accum were false, and a non-default lg_prof_tcmax were used and/or threads were destroyed.
* Fix a prof-related bug in realloc().Jason Evans2011-08-311-3/+8
| | | | | Fix realloc() such that it only records the object passed in as freed if no OOM error occurs.
* Add missing prof_malloc() call in allocm().Jason Evans2011-08-131-3/+2
| | | | | | Add a missing prof_malloc() call in allocm(). Before this fix, negative object/byte counts could be observed in heap profiles for applications that use allocm().
* Fix off-by-one backtracing issues.Jason Evans2011-08-121-13/+36
| | | | | | | | | | | | Rewrite prof_alloc_prep() as a cpp macro, PROF_ALLOC_PREP(), in order to remove any doubt as to whether an additional stack frame is created. Prior to this change, it was assumed that inlining would reduce the total number of frames in the backtrace, but in practice behavior wasn't completely predictable. Create imemalign() and call it from posix_memalign(), memalign(), and valloc(), so that all entry points require the same number of stack frames to be ignored during backtracing.
* Conditionalize an isalloc() call in rallocm().Jason Evans2011-08-121-2/+2
| | | | Conditionalize an isalloc() call in rallocm() that be unnecessary.
* Fix two prof-related bugs in rallocm().Jason Evans2011-08-122-3/+11
| | | | | | | 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.
* Clean up prof-related comments.Jason Evans2011-08-101-23/+16
| | | | | | | Clean up some prof-related comments to more accurately reflect how the code works. Simplify OOM handling code in a couple of prof-related error paths.
* Use prof_tdata_cleanup() argument.Jason Evans2011-08-091-24/+19
| | | | | Use the argument to prof_tdata_cleanup(), rather than calling PROF_TCACHE_GET(). This fixes a bug in the NO_TLS case.
* 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).
* Use LLU suffix for all 64-bit constants.Jason Evans2011-05-222-2/+2
| | | | | | Add the LLU suffix for all 0x... 64-bit constants. Reported by Jakob Blomer.
* Move repo contents in jemalloc/ to top level.Jason Evans2011-04-0121-0/+11560