Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global allocator improvements #18293

Merged
merged 5 commits into from Oct 26, 2014
Merged

global allocator improvements #18293

merged 5 commits into from Oct 26, 2014

Commits on Oct 25, 2014

  1. Make MIN_ALIGN a const to allow better optimization

    With MIN_ALIGN as a static, other crates don't have access to its value
    at compile time, because it is an extern global. That means that the
    checks against it can't be optimized out, which is rather unfortunate.
    So let's make it a constant instead.
    dotdash authored and thestinger committed Oct 25, 2014
    Configuration menu
    Copy the full SHA
    6c18e50 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6f253bd View commit details
    Browse the repository at this point in the history
  3. get rid of libc_heap::{malloc_raw, realloc_raw}

    The C standard library functions should be used directly. The quirky
    NULL / zero-size allocation workaround is no longer necessary and was
    adding an extra branch to the allocator code path in a build without
    jemalloc. This is a small step towards liballoc being compatible with
    handling OOM errors instead of aborting (#18292).
    
    [breaking-change]
    thestinger committed Oct 25, 2014
    Configuration menu
    Copy the full SHA
    2bc4d3e View commit details
    Browse the repository at this point in the history
  4. return the new usable size from reallocate_inplace

    The real size is also more useful than just a boolean, and the caller
    can easily determine if the operation failed from the real size. In most
    cases, the caller is only going to be growing the allocation so a branch
    can be avoided.
    
    [breaking-change]
    thestinger committed Oct 25, 2014
    Configuration menu
    Copy the full SHA
    a6426cb View commit details
    Browse the repository at this point in the history
  5. 9 Configuration menu
    Copy the full SHA
    a9e8510 View commit details
    Browse the repository at this point in the history