mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 10:55:14 +00:00
document that __rust_alloc is also magic to our LLVM fork
This commit is contained in:
parent
5fab31e5dd
commit
af869c2f8d
@ -23,6 +23,8 @@ extern "Rust" {
|
||||
// (the code expanding that attribute macro generates those functions), or to call
|
||||
// the default implementations in libstd (`__rdl_alloc` etc. in `library/std/src/alloc.rs`)
|
||||
// otherwise.
|
||||
// The rustc fork of LLVM also special-cases these function names to be able to optimize them
|
||||
// like `malloc`, `realloc`, and `free`, respectively.
|
||||
#[rustc_allocator]
|
||||
#[rustc_allocator_nounwind]
|
||||
fn __rust_alloc(size: usize, align: usize) -> *mut u8;
|
||||
|
Loading…
Reference in New Issue
Block a user