Skip to content
  1. Jan 22, 2014
  2. Jan 21, 2014
  3. Jan 18, 2014
  4. Jan 17, 2014
    • Jason Evans's avatar
      eefdd02e
    • Jason Evans's avatar
      Fix name mangling for stress tests. · f234dc51
      Jason Evans authored
      Fix stress tests such that testlib code uses the jet_ allocator, but
      test code uses libjemalloc.
      
      Generate jemalloc_{rename,mangle}.h, the former because it's needed for
      the stress test name mangling fix, and the latter for consistency.  As
      an artifact of this change, some (but not all) definitions related to
      the experimental API are absent from the headers unless the feature is
      enabled at configure time.
      f234dc51
  5. Jan 16, 2014
    • Jason Evans's avatar
      Refactor prof_dump() to reduce contention. · 4f37ef69
      Jason Evans authored
      Refactor prof_dump() to use a two pass algorithm, and prof_leave() prior
      to the second pass.  This avoids write(2) system calls while holding
      critical prof resources.
      
      Fix prof_dump() to close the dump file descriptor for all relevant error
      paths.
      
      Minimize the size of prof-related static buffers when prof is disabled.
      This saves roughly 65 KiB of application memory for non-prof builds.
      
      Refactor prof_ctx_init() out of prof_lookup_global().
      4f37ef69
  6. Jan 15, 2014
  7. Jan 13, 2014
    • Jason Evans's avatar
      Extract profiling code from [re]allocation functions. · b2c31660
      Jason Evans authored
      Extract profiling code from malloc(), imemalign(), calloc(), realloc(),
      mallocx(), rallocx(), and xallocx().  This slightly reduces the amount
      of code compiled into the fast paths, but the primary benefit is the
      combinatorial complexity reduction.
      
      Simplify iralloc[t]() by creating a separate ixalloc() that handles the
      no-move cases.
      
      Further simplify [mrxn]allocx() (and by implication [mrn]allocm()) to
      make request size overflows due to size class and/or alignment
      constraints trigger undefined behavior (detected by debug-only
      assertions).
      
      Report ENOMEM rather than EINVAL if an OOM occurs during heap profiling
      backtrace creation in imemalign().  This bug impacted posix_memalign()
      and aligned_alloc().
      b2c31660
  8. Jan 08, 2014
  9. Jan 07, 2014
    • Jason Evans's avatar
      Add util unit tests, and fix discovered bugs. · e18c25d2
      Jason Evans authored
      Add unit tests for pow2_ceil(), malloc_strtoumax(), and
      malloc_snprintf().
      
      Fix numerous bugs in malloc_strotumax() error handling/reporting.  These
      bugs could have caused application-visible issues for some seldom used
      (0X... and 0... prefixes) or malformed MALLOC_CONF or mallctl() argument
      strings, but otherwise they had no impact.
      
      Fix numerous bugs in malloc_snprintf().  These bugs were not exercised
      by existing malloc_*printf() calls, so they had no impact.
      e18c25d2
  10. Jan 04, 2014
  11. Jan 03, 2014
    • Jason Evans's avatar
      Convert rtree from (void *) to (uint8_t) storage. · b954bc5d
      Jason Evans authored
      Reduce rtree memory usage by storing booleans (1 byte each) rather than
      pointers.  The rtree code is only used to record whether jemalloc manages
      a chunk of memory, so there's no need to store pointers in the rtree.
      
      Increase rtree node size to 64 KiB in order to reduce tree depth from 13
      to 3 on 64-bit systems.  The conversion to more compact leaf nodes was
      enough by itself to make the rtree depth 1 on 32-bit systems; due to the
      fact that root nodes are smaller than the specified node size if
      possible, the node size change has no impact on 32-bit systems (assuming
      default chunk size).
      b954bc5d
    • Jason Evans's avatar
      Add rtree unit tests. · b980cc77
      Jason Evans authored
      b980cc77
  12. Jan 02, 2014
  13. Dec 21, 2013
  14. Dec 20, 2013
  15. Dec 19, 2013
  16. Dec 18, 2013
    • Jason Evans's avatar
      Add missing prototypes. · 1b75b4e6
      Jason Evans authored
      1b75b4e6
    • Jason Evans's avatar
      Add quarantine unit tests. · 0d6c5d8b
      Jason Evans authored
      Verify that freed regions are quarantined, and that redzone corruption
      is detected.
      
      Introduce a testing idiom for intercepting/replacing internal functions.
      In this case the replaced function is ordinarily a static function, but
      the idiom should work similarly for library-private functions.
      0d6c5d8b
  17. Dec 17, 2013
  18. Dec 16, 2013