We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
#[cold]
1 parent a83d2af commit fae60b3Copy full SHA for fae60b3
src/liballoc/heap.rs
@@ -28,6 +28,7 @@ pub mod __core {
28
extern "Rust" {
29
#[allocator]
30
fn __rust_alloc(size: usize, align: usize, err: *mut u8) -> *mut u8;
31
+ #[cold]
32
fn __rust_oom(err: *const u8) -> !;
33
fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize);
34
fn __rust_usable_size(layout: *const u8,
@@ -81,6 +82,7 @@ unsafe impl Alloc for Heap {
81
82
}
83
84
#[inline]
85
86
fn oom(&mut self, err: AllocErr) -> ! {
87
unsafe {
88
__rust_oom(&err as *const AllocErr as *const u8)
0 commit comments