diff options
| author | bors <bors@rust-lang.org> | 2015-08-14 22:52:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-08-14 22:52:11 +0000 |
| commit | ab450ef22b08241513734f73952a4a1315738b03 (patch) | |
| tree | c90cf7f1c1b4e6fcf6302b66f66f9c9163fdc9be /src/rustllvm/RustWrapper.cpp | |
| parent | c1e865c9df3c6928525025e410fc3d165fb97c85 (diff) | |
| parent | 45bf1ed1a1123122ded05ae2eedaf0f190e52726 (diff) | |
| download | rust-ab450ef22b08241513734f73952a4a1315738b03.tar.gz rust-ab450ef22b08241513734f73952a4a1315738b03.zip | |
Auto merge of #27400 - alexcrichton:less-jemalloc, r=brson
This commit is an implementation of [RFC 1183][rfc] which allows swapping out the default allocator on nightly Rust. No new stable surface area should be added as a part of this commit. [rfc]: https://github.com/rust-lang/rfcs/pull/1183 Two new attributes have been added to the compiler: * `#![needs_allocator]` - this is used by liballoc (and likely only liballoc) to indicate that it requires an allocator crate to be in scope. * `#![allocator]` - this is a indicator that the crate is an allocator which can satisfy the `needs_allocator` attribute above. The ABI of the allocator crate is defined to be a set of symbols that implement the standard Rust allocation/deallocation functions. The symbols are not currently checked for exhaustiveness or typechecked. There are also a number of restrictions on these crates: * An allocator crate cannot transitively depend on a crate that is flagged as needing an allocator (e.g. allocator crates can't depend on liballoc). * There can only be one explicitly linked allocator in a final image. * If no allocator is explicitly requested one will be injected on behalf of the compiler. Binaries and Rust dylibs will use jemalloc by default where available and staticlibs/other dylibs will use the system allocator by default. Two allocators are provided by the distribution by default, `alloc_system` and `alloc_jemalloc` which operate as advertised. Closes #27389
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
