Skip to content
  1. Dec 06, 2013
    • Jason Evans's avatar
      Disable floating point code/linking when possible. · d37d5ade
      Jason Evans authored
      Unless heap profiling is enabled, disable floating point code and don't
      link with libm.  This, in combination with e.g. EXTRA_CFLAGS=-mno-sse on
      x64 systems, makes it possible to completely disable floating point
      register use.  Some versions of glibc neglect to save/restore
      caller-saved floating point registers during dynamic lazy symbol
      loading, and the symbol loading code uses whatever malloc the
      application happens to have linked/loaded with, the result being
      potential floating point register corruption.
      d37d5ade
    • Jason Evans's avatar
      Fix more test refactoring issues. · dc1bed62
      Jason Evans authored
      dc1bed62
    • Jason Evans's avatar
      Fix test refactoring issues for Linux. · 14990b83
      Jason Evans authored
      14990b83
  2. Dec 05, 2013
  3. Dec 04, 2013
    • Jason Evans's avatar
      Fix build target to be build_lib, as documented. · 95424fc1
      Jason Evans authored
      Reported by Michael Truog.
      95424fc1
    • Jason Evans's avatar
      Refactor to support more varied testing. · 86abd0dc
      Jason Evans authored
      Refactor the test harness to support three types of tests:
      - unit: White box unit tests.  These tests have full access to all
        internal jemalloc library symbols.  Though in actuality all symbols
        are prefixed by jet_, macro-based name mangling abstracts this away
        from test code.
      - integration: Black box integration tests.  These tests link with
        the installable shared jemalloc library, and with the exception of
        some utility code and configure-generated macro definitions, they have
        no access to jemalloc internals.
      - stress: Black box stress tests.  These tests link with the installable
        shared jemalloc library, as well as with an internal allocator with
        symbols prefixed by jet_ (same as for unit tests) that can be used to
        allocate data structures that are internal to the test code.
      
      Move existing tests into test/{unit,integration}/ as appropriate.
      
      Split out internal parts of jemalloc_defs.h.in and put them in
      jemalloc_internal_defs.h.in.  This reduces internals exposure to
      applications that #include <jemalloc/jemalloc.h>.
      
      Refactor jemalloc.h header generation so that a single header file
      results, and the prototypes can be used to generate jet_ prototypes for
      tests.  Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
      jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
      use a shell script to generate a unified jemalloc.h at configure time.
      
      Change the default private namespace prefix from "" to "je_".
      
      Add missing private namespace mangling.
      
      Remove hard-coded private_namespace.h.  Instead generate it and
      private_unnamespace.h from private_symbols.txt.  Use similar logic for
      public symbols, which aids in name mangling for jet_ symbols.
      
      Add test_warn() and test_fail().  Replace existing exit(1) calls with
      test_fail() calls.
      86abd0dc
    • Jason Evans's avatar
      Avoid deprecated sbrk(2) on OS X. · 66688535
      Jason Evans authored
      Avoid referencing sbrk(2) on OS X, because it is deprecated as of OS X
      10.9 (Mavericks), and the compiler warns against using it.
      66688535
  4. Dec 03, 2013
  5. Nov 30, 2013
    • Jason Evans's avatar
      Clean up malloc_ncpus(). · addad093
      Jason Evans authored
      Clean up malloc_ncpus() by replacing incorrectly indented if..else
      branches with a ?: expression.
      
      Submitted by Igor Podlesny.
      addad093
  6. Nov 26, 2013
  7. Nov 20, 2013
    • Jason Evans's avatar
      Fix a potential infinite loop during thread exit. · d6df9143
      Jason Evans authored
      Fix malloc_tsd_dalloc() to bypass tcache when dallocating, so that there
      is no danger of causing tcache reincarnation during thread exit.
      Whether this infinite loop occurs depends on the pthreads TSD
      implementation; it is known to occur on Solaris.
      
      Submitted by Markus Eberspächer.
      d6df9143
  8. Oct 30, 2013
  9. Oct 28, 2013
  10. Oct 25, 2013
    • Leonard Crestez's avatar
      Add support for LinuxThreads. · cb17fc6a
      Leonard Crestez authored
      
      
      When using LinuxThreads pthread_setspecific triggers recursive
      allocation on all threads. Work around this by creating a global linked
      list of in-progress tsd initializations.
      
      This modifies the _tsd_get_wrapper macro-generated function. When it has
      to initialize an TSD object it will push the item to the linked list
      first. If this causes a recursive allocation then the _get_wrapper
      request is satisfied from the list. When pthread_setspecific returns the
      item is removed from the list.
      
      This effectively adds a very poor substitute for real TLS used only
      during pthread_setspecific allocation recursion.
      
      Signed-off-by: default avatarCrestez Dan Leonard <lcrestez@ixiacom.com>
      cb17fc6a
    • Leonard Crestez's avatar
      Delay pthread_atfork registering. · ac4403ca
      Leonard Crestez authored
      
      
      This function causes recursive allocation on LinuxThreads.
      
      Signed-off-by: default avatarCrestez Dan Leonard <lcrestez@ixiacom.com>
      ac4403ca
  11. Oct 22, 2013
  12. Oct 21, 2013
  13. Oct 20, 2013
    • Jason Evans's avatar
      Fix a race condition in the "arenas.extend" mallctl. · 7b65180b
      Jason Evans authored
      Fix a race condition in the "arenas.extend" mallctl that could lead to
      internal data structure corruption.  The race could be hit if one
      thread called the "arenas.extend" mallctl while another thread
      concurrently triggered initialization of one of the lazily created
      arenas.
      7b65180b
    • Jason Evans's avatar
      Fix an off-by-one flaw in a test. · 0f1d8ec3
      Jason Evans authored
      0f1d8ec3
    • Jason Evans's avatar
      Fix dangerous casts in tests. · 8edaf86b
      Jason Evans authored
      Fix dangerous casts of int variables to pointers in thread join function
      calls.  On LP64 systems, int and pointers are different sizes, so
      writes can corrupt memory.
      8edaf86b
    • Jason Evans's avatar
      Fix a Valgrind integration flaw. · dda90f59
      Jason Evans authored
      Fix a Valgrind integration flaw that caused Valgrind warnings about
      reads of uninitialized memory in internal zero-initialized data
      structures (relevant to tcache and prof code).
      dda90f59
    • Jason Evans's avatar
      Update ChangeLog. · ff08ef70
      Jason Evans authored
      ff08ef70
    • Jason Evans's avatar
      Fix a Valgrind integration flaw. · 87a02d2b
      Jason Evans authored
      Fix a Valgrind integration flaw that caused Valgrind warnings about
      reads of uninitialized memory in arena chunk headers.
      87a02d2b
    • Jason Evans's avatar
      Fix inlining warning. · 543abf7e
      Jason Evans authored
      Add the JEMALLOC_ALWAYS_INLINE_C macro and use it for always-inlined
      functions declared in .c files.  This fixes a function attribute
      inconsistency for debug builds that resulted in (harmless) compiler
      warnings about functions not being inlinable.
      
      Reported by Ricardo Nabinger Sanchez.
      543abf7e
    • Jason Evans's avatar
      Silence an unused variable warning. · 3ab682d3
      Jason Evans authored
      Reported by Ricardo Nabinger Sanchez.
      3ab682d3
  14. Oct 14, 2013
  15. Oct 03, 2013
  16. Aug 20, 2013
    • Jason Evans's avatar
      Fix build break for MSVC. · 80ddf498
      Jason Evans authored
      Introduce AROUT to control whether there is space between ARFLAGS and
      $@.  This regression was introduced by
      ad505e0e.
      
      Reported by Mike Hommey.
      80ddf498
  17. Aug 19, 2013
  18. Jun 03, 2013