- Mar 01, 2017
-
-
Jason Evans authored
-
Jason Evans authored
This avoids signed/unsigned comparison warnings when specifying integer constants as inputs. Clean up whitespace and add clarifying parentheses for CONF_HANDLE_SIZE_T(opt_lg_chunk, ...).
-
Jason Evans authored
-
- Feb 28, 2017
-
-
Jason Evans authored
Detect whether chunks start off as THP-capable by default (according to the state of /sys/kernel/mm/transparent_hugepage/enabled), and use this as the basis for whether to call pages_nohuge() once per chunk during first purge of any of the chunk's page runs. Add the --disable-thp configure option, as well as the the opt.thp mallctl. This resolves #541.
-
Jason Evans authored
Convert CFLAGS to be a concatenation: CFLAGS := CONFIGURE_CFLAGS SPECIFIED_CFLAGS EXTRA_CFLAGS This ordering makes it possible to override the flags set by the configure script both during and after configuration, with CFLAGS and EXTRA_CFLAGS, respectively. This resolves #619.
-
Qi Wang authored
When multiple threads calling stats_print, race could happen as we read the counters in separate mallctl calls; and the removed assertion could fail when other operations happened in between the mallctl calls. For simplicity, output "race" in the utilization field in this case. This resolves #616.
-
Jason Evans authored
Fix lg_chunk clamping to take into account cache-oblivious large allocation. This regression only resulted in incorrect behavior if !config_fill (false unless --disable-fill specified) and config_cache_oblivious (true unless --disable-cache-oblivious specified). This regression was introduced by 8a03cf03 (Implement cache index randomization for large allocations.), which was first released in 4.0.0. This resolves #555.
-
- Feb 27, 2017
-
-
Jason Evans authored
This resolves #614.
-
Jason Evans authored
This regression was caused by b9408d77 (Fix/simplify chunk_recycle() allocation size computations.). This resolves #647.
-
- Feb 26, 2017
-
-
Jason Evans authored
-
Jason Evans authored
Implement and test a JSON validation parser. Use the parser to validate JSON output from malloc_stats_print(), with a significant subset of supported output options. This resolves #583.
-
Jason Evans authored
These bugs were introduced by b599b322 (Add "J" (JSON) support to malloc_stats_print().), which was first released in 4.3.0. This resolves #615.
-
Jason Evans authored
Fix chunk_alloc_dss() to account for bytes that are not a multiple of the chunk size. This regression was introduced by e2bcf037 (Make dss operations lockless.), which was first released in 4.3.0.
-
- Feb 23, 2017
-
-
Jason Evans authored
In some cases the prof machinery allocates (in order to modify the bt2gctx hash table), and such operations are synchronized via bt2gctx_mtx. Rather than asserting that no locks are held on entry into functions that may call prof_gdump(), make the weaker assertion that no "core" locks are held. The prof machinery enqueues dumps triggered by prof_gdump() calls when bt2gctx_mtx is held, so this weakened assertion avoids false failures in such cases.
-
Jason Evans authored
This makes it possible to make lock state assertions about precisely which locks are held.
-
Jason Evans authored
This fixes interactions with witness_assert_depth[_to_rank](), which was added in dad74bd3 (Convert witness_assert_lockless() to witness_assert_lock_depth().).
-
David Goldblatt authored
This will hopefully catch some windows-specific bugs.
-
Jason Evans authored
malloc_conf does not reliably work with MSVC, which complains of "inconsistent dll linkage", i.e. its inability to support the application overriding malloc_conf when dynamically linking/loading. Work around this limitation by adding test harness support for per test shell script sourcing, and converting all tests to use MALLOC_CONF instead of malloc_conf.
-
Jason Evans authored
Synchronize tcaches with tcaches_mtx rather than ctl_mtx. Add missing synchronization for tcache flushing. This bug was introduced by 1cb181ed (Implement explicit tcache support.), which was first released in 4.0.0.
-
- Feb 22, 2017
-
-
Jason Evans authored
This regression was caused by 8f61fded (Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *).). This resolves #538.
-
- Feb 21, 2017
-
-
David Goldblatt authored
Introduces gen_travis.py, which generates .travis.yml, and updates .travis.yml to be the generated version. The travis build matrix approach doesn't play well with mixing and matching various different environment settings, so we generate every build explicitly, rather than letting them do it for us. To avoid abusing travis resources (and save us time waiting for CI results), we don't test every possible combination of options; we only check up to 2 unusual settings at a time.
-
- Jan 25, 2017
-
-
Tamir Duberstein authored
Avoid the name secure_getenv to avoid redeclaring secure_getenv when secure_getenv is present but its use is manually disabled via ac_cv_func_secure_getenv=no.
-
- Jan 24, 2017
-
-
Jason Evans authored
-
Jason Evans authored
This makes it possible to make lock state assertions about precisely which locks are held.
-
- Jan 18, 2017
-
-
Mike Hommey authored
Some system libraries are using malloc_default_zone() and then using some of the malloc_zone_* API. Under normal conditions, those functions check the malloc_zone_t/malloc_introspection_t struct for the values that are allowed to be NULL, so that a NULL deref doesn't happen. As of OSX 10.12, malloc_default_zone() doesn't return the actual default zone anymore, but returns a fake, wrapper zone. The wrapper zone defines all the possible functions in the malloc_zone_t/malloc_introspection_t struct (almost), and calls the function from the registered default zone (jemalloc in our case) on its own. Without checking whether the pointers are NULL. This means that a system library that calls e.g. malloc_zone_batch_malloc(malloc_default_zone(), ...) ends up trying to call jemalloc_zone.batch_malloc, which is NULL, and crash follows. So as of OSX 10.12, the default zone is required to have all the functions available (really, the same as the wrapper zone), even if they do nothing. This is arguably a bug in libsystem_malloc in OSX 10.12, but jemalloc still needs to work in that case.
-
Mike Hommey authored
The SDK jemalloc is built against might be not be the latest for various reasons, but the resulting binary ought to work on newer versions of OSX. In order to ensure this, we need the fullest definitions possible, so copy what we need from the latest version of malloc/malloc.h available on opensource.apple.com.
-
- Jan 13, 2017
-
-
John Paul Adrian Glaubitz authored
Currently, jemalloc detects sparc64 targets by checking whether __sparc64__ is defined. However, this definition is used on BSD targets only. Linux targets define both __sparc__ and __arch64__ for sparc64. Since this also works on BSD, rather use __sparc__ and __arch64__ instead of __sparc64__ to detect sparc64 targets.
-
- Dec 04, 2016
-
-
Jason Evans authored
-
Jason Evans authored
-
Jason Evans authored
This resolves #517.
-
Jason Evans authored
-
Jason Evans authored
This fixes a regression caused by e98a620c (Mark partially purged arena chunks as non-hugepage.).
-
- Nov 29, 2016
-
-
John Szakmeister authored
The core issue here is the weak linking of the symbol, and in certain environments--for instance, using the latest Xcode (8.1) with the latest SDK (10.12)--os_unfair_lock may resolve even though you're compiling on a host that doesn't support it (10.11). We can use the availability macros to circumvent this problem, and detect that we're not compiling for a target that is going to support them and error out at compile time. The other alternative is to do a runtime check, but that presents issues for cross-compiling.
-
- Nov 24, 2016
-
-
Jason Evans authored
Add the pages_[no]huge() functions, which toggle huge page state via madvise(..., MADV_[NO]HUGEPAGE) calls. The first time a page run is purged from within an arena chunk, call pages_nohuge() to tell the kernel to make no further attempts to back the chunk with huge pages. Upon arena chunk deletion, restore the associated virtual memory to its original state via pages_huge(). This resolves #243.
-
- Nov 22, 2016
-
-
Jason Evans authored
This resolves #509.
-
- Nov 18, 2016
-
-
Jason Evans authored
Some versions of Android provide a pthreads library without providing pthread_atfork(), so in practice a separate feature test is necessary for the latter.
-
- Nov 17, 2016
-
-
Jason Evans authored
Add feature tests for the MADV_FREE and MADV_DONTNEED flags to madvise(2), so that MADV_FREE is detected and used for Linux kernel versions 4.5 and newer. Refactor pages_purge() so that on systems which support both flags, MADV_FREE is preferred over MADV_DONTNEED. This resolves #387.
-
Jason Evans authored
-
Jason Evans authored
-
Jason Evans authored
-