| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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 realloc() such that it only records the object passed in as freed if
no OOM error occurs.
|
| |
|
|
|
|
| |
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().
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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() that be unnecessary.
|
| |
|
|
|
|
|
| |
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 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 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() 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).
|
| |
|
|
|
|
| |
Add the LLU suffix for all 0x... 64-bit constants.
Reported by Jakob Blomer.
|
| |
|