Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/jemalloc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3288e0659c08fb5006f6d6dd4b5675ed0c2c432a
Choose a base ref
...
head repository: rust-lang/jemalloc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 11bfb0dcf85f7aa92abd30524bb1e42e18d108c6
Choose a head ref
  • 9 commits
  • 6 files changed
  • 3 contributors

Commits on Mar 2, 2016

  1. Configuration menu
    Copy the full SHA
    aab1c0a View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2016

  1. Avoid getting the same default zone twice in a row.

    847ff22 added a call to malloc_default_zone() before the main loop in
    register_zone, effectively making malloc_default_zone() called twice
    without any different outcome expected in the returned result.
    
    It is also called once at the beginning, and a second time at the end
    of the loop block.
    
    Instead, call it only once per iteration.
    glandium committed Jul 8, 2016
    Configuration menu
    Copy the full SHA
    9355bd6 View commit details
    Browse the repository at this point in the history
  2. Change how the default zone is found

    On OSX 10.12, malloc_default_zone returns a special zone that is not
    present in the list of registered zones. That zone uses a "lite zone"
    if one is present (apparently enabled when malloc stack logging is
    enabled), or the first registered zone otherwise. In practice this
    means unless malloc stack logging is enabled, the first registered
    zone is the default.
    
    So get the list of zones to get the first one, instead of relying on
    malloc_default_zone.
    glandium committed Jul 8, 2016
    Configuration menu
    Copy the full SHA
    e058ca6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    da18fef View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2017

  1. Formatting fixes.

    jasone authored and glandium committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    515d2a0 View commit details
    Browse the repository at this point in the history
  2. Fix/refactor zone allocator integration code.

    Fix zone_force_unlock() to reinitialize, rather than unlocking mutexes,
    since OS X 10.12 cannot tolerate a child unlocking mutexes that were
    locked by its parent.
    
    Refactor; this was a side effect of experimenting with zone
    {de,re}registration during fork(2).
    jasone authored and glandium committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    485c921 View commit details
    Browse the repository at this point in the history
  3. Don't rely on OSX SDK malloc/malloc.h for malloc_zone struct definitions

    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.
    glandium committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    d5a6ab5 View commit details
    Browse the repository at this point in the history
  4. Add dummy implementations for most remaining OSX zone allocator funct…

    …ions
    
    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.
    glandium committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    62d87fc View commit details
    Browse the repository at this point in the history
  5. Merge pull request #16 from glandium/rust

    Update zone allocator with various OSX 10.12 fixes
    alexcrichton authored Jan 18, 2017
    Configuration menu
    Copy the full SHA
    11bfb0d View commit details
    Browse the repository at this point in the history
Loading