Skip to content
  1. Feb 01, 2013
    • Jason Evans's avatar
      Fix Valgrind integration. · 06912756
      Jason Evans authored
      Fix Valgrind integration to annotate all internally allocated memory in
      a way that keeps Valgrind happy about internal data structure access.
      06912756
    • Jason Evans's avatar
      Fix a chunk recycling bug. · a7a28c33
      Jason Evans authored
      Fix a chunk recycling bug that could cause the allocator to lose track
      of whether a chunk was zeroed.  On FreeBSD, NetBSD, and OS X, it could
      cause corruption if allocating via sbrk(2) (unlikely unless running with
      the "dss:primary" option specified).  This was completely harmless on
      Linux unless using mlockall(2) (and unlikely even then, unless the
      --disable-munmap configure option or the "dss:primary" option was
      specified).  This regression was introduced in 3.1.0 by the
      mlockall(2)/madvise(2) interaction fix.
      a7a28c33
  2. Jan 31, 2013
    • Jason Evans's avatar
      Fix two quarantine bugs. · d0e942e4
      Jason Evans authored
      Internal reallocation of the quarantined object array leaked the old array.
      
      Reallocation failure for internal reallocation of the quarantined object
      array (very unlikely) resulted in memory corruption.
      d0e942e4
    • Jason Evans's avatar
      Fix potential TLS-related memory corruption. · bbe29d37
      Jason Evans authored
      Avoid writing to uninitialized TLS as a side effect of deallocation.
      Initializing TLS during deallocation is unsafe because it is possible
      that a thread never did any allocation, and that TLS has already been
      deallocated by the threads library, resulting in write-after-free
      corruption.  These fixes affect prof_tdata and quarantine; all other
      uses of TLS are already safe, whether intentionally (as for tcache) or
      unintentionally (as for arenas).
      bbe29d37
  3. Jan 23, 2013
  4. Jan 22, 2013
    • Jason Evans's avatar
      Update phony targets. · 42ba90eb
      Jason Evans authored
      Submitted by Frederik Deweerdt.
      42ba90eb
    • Jason Evans's avatar
      Use config_* instead of JEMALLOC_*. · ba175a2b
      Jason Evans authored
      Convert a couple of stragglers from JEMALLOC_* to use config_*.
      ba175a2b
    • Jason Evans's avatar
      Update hash from MurmurHash2 to MurmurHash3. · ae03bf6a
      Jason Evans authored
      Update hash from MurmurHash2 to MurmurHash3, primarily because the
      latter generates 128 bits in a single call for no extra cost, which
      simplifies integration with cuckoo hashing.
      ae03bf6a
    • Jason Evans's avatar
      Fix AC_PATH_PROG() calls to specify default. · 7329a4f0
      Jason Evans authored
      Fix AC_PATH_PROG() calls to specify 'false' as the default, so that if
      the configure script fails to find a program, the false program is
      instead called, and an error occurs.  Prior to this fix, if xsltproc
      could not be found, make would not report an error due to the leading -o
      in the xsltproc invocation.
      
      Reported by David Reiss.
      7329a4f0
    • Jason Evans's avatar
      Add and use JEMALLOC_ALWAYS_INLINE. · 88393cb0
      Jason Evans authored
      Add JEMALLOC_ALWAYS_INLINE and use it to guarantee that the entire fast
      paths of the primary allocation/deallocation functions are inlined.
      88393cb0
    • Jason Evans's avatar
      Tighten valgrind integration. · 38067483
      Jason Evans authored
      Tighten valgrind integration such that immediately after memory is
      validated or zeroed, valgrind is told to forget the memory's 'defined'
      state.  The only place newly allocated memory should be left marked as
      'defined' is in the public functions (e.g. calloc() and realloc()).
      38067483
    • Jason Evans's avatar
      Avoid validating freshly mapped memory. · 14a2c6a6
      Jason Evans authored
      Move validation of supposedly zeroed pages from chunk_alloc() to
      chunk_recycle().  There is little point to validating newly mapped
      memory returned by chunk_alloc_mmap(), and memory that comes from sbrk()
      is explicitly zeroed, so there is little risk to assuming that
      chunk_alloc_dss() actually does the zeroing properly.
      
      This relaxation of validation can make a big difference to application
      startup time and overall system usage on platforms that use jemalloc as
      the system allocator (namely FreeBSD).
      
      Submitted by Ian Lepore <ian@FreeBSD.org>.
      14a2c6a6
  5. Dec 24, 2012
  6. Dec 23, 2012
  7. Dec 12, 2012
    • Jason Evans's avatar
      Fix chunk_recycle() Valgrind integration. · 1271185b
      Jason Evans authored
      Fix chunk_recycyle() to unconditionally inform Valgrind that returned
      memory is undefined.  This fixes Valgrind warnings that would result
      from a huge allocation being freed, then recycled for use as an arena
      chunk.  The arena code would write metadata to the chunk header, and
      Valgrind would consider these invalid writes.
      1271185b
  8. Nov 30, 2012
  9. Nov 25, 2012
    • Mike Hommey's avatar
      Allow to build without exporting symbols · 9906660e
      Mike Hommey authored
      When statically linking jemalloc, it may be beneficial not to export its
      symbols if it makes sense, which allows the compiler and the linker to do
      some further optimizations.
      9906660e
  10. Nov 13, 2012
  11. Nov 09, 2012
  12. Nov 07, 2012
  13. Nov 06, 2012
    • Jason Evans's avatar
      Purge unused dirty pages in a fragmentation-reducing order. · e3d13060
      Jason Evans authored
      Purge unused dirty pages in an order that first performs clean/dirty run
      defragmentation, in order to mitigate available run fragmentation.
      
      Remove the limitation that prevented purging unless at least one chunk
      worth of dirty pages had accumulated in an arena.  This limitation was
      intended to avoid excessive purging for small applications, but the
      threshold was arbitrary, and the effect of questionable utility.
      
      Relax opt_lg_dirty_mult from 5 to 3.  This compensates for increased
      likelihood of allocating clean runs, given the same ratio of clean:dirty
      runs, and reduces the potential for repeated purging in pathological
      large malloc/free loops that push the active:dirty page ratio just over
      the purge threshold.
      e3d13060
  14. Nov 04, 2012
  15. Oct 17, 2012
  16. Oct 16, 2012
  17. Oct 15, 2012
  18. Oct 13, 2012
    • Jason Evans's avatar
      Add arena-specific and selective dss allocation. · 609ae595
      Jason Evans authored
      Add the "arenas.extend" mallctl, so that it is possible to create new
      arenas that are outside the set that jemalloc automatically multiplexes
      threads onto.
      
      Add the ALLOCM_ARENA() flag for {,r,d}allocm(), so that it is possible
      to explicitly allocate from a particular arena.
      
      Add the "opt.dss" mallctl, which controls the default precedence of dss
      allocation relative to mmap allocation.
      
      Add the "arena.<i>.dss" mallctl, which makes it possible to set the
      default dss precedence on a per arena or global basis.
      
      Add the "arena.<i>.purge" mallctl, which obsoletes "arenas.purge".
      
      Add the "stats.arenas.<i>.dss" mallctl.
      609ae595
  19. Oct 10, 2012