mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
fix __rust_alloc_error_handler comment
This commit is contained in:
parent
9a74fb726e
commit
6cd9b88a25
@ -26,8 +26,6 @@ extern "Rust" {
|
|||||||
fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8;
|
fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8;
|
||||||
#[rustc_allocator_nounwind]
|
#[rustc_allocator_nounwind]
|
||||||
fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8;
|
fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8;
|
||||||
#[rustc_allocator_nounwind]
|
|
||||||
fn __rust_alloc_error_handler(size: usize, align: usize) -> !;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The global memory allocator.
|
/// The global memory allocator.
|
||||||
@ -323,6 +321,16 @@ pub(crate) unsafe fn box_free<T: ?Sized>(ptr: Unique<T>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// # Allocation error handler
|
||||||
|
|
||||||
|
extern "Rust" {
|
||||||
|
// This is the magic symbol to call the global alloc error handler. rustc generates
|
||||||
|
// it to call `__rg_oom` if there is a `#[alloc_error_handler]`, or to call the
|
||||||
|
// default implementations below (`__rdl_oom`) otherwise.
|
||||||
|
#[rustc_allocator_nounwind]
|
||||||
|
fn __rust_alloc_error_handler(size: usize, align: usize) -> !;
|
||||||
|
}
|
||||||
|
|
||||||
/// Abort on memory allocation error or failure.
|
/// Abort on memory allocation error or failure.
|
||||||
///
|
///
|
||||||
/// Callers of memory allocation APIs wishing to abort computation
|
/// Callers of memory allocation APIs wishing to abort computation
|
||||||
|
Loading…
Reference in New Issue
Block a user