Lines Matching defs:alloc
15 pub use core::alloc::*;
24 // the default implementations in std (`__rdl_alloc` etc. in `library/std/src/alloc.rs`)
51 /// accessed through the [free functions in `alloc`](self#functions).
58 pub use std::alloc::Global;
62 /// This function forwards calls to the [`GlobalAlloc::alloc`] method
66 /// This function is expected to be deprecated in favor of the `alloc` method
71 /// See [`GlobalAlloc::alloc`].
76 /// use std::alloc::{alloc, dealloc, handle_alloc_error, Layout};
80 /// let ptr = alloc(layout);
94 pub unsafe fn alloc(layout: Layout) -> *mut u8 {
157 /// use std::alloc::{alloc_zeroed, dealloc, Layout};
183 let raw_ptr = if zeroed { alloc_zeroed(layout) } else { alloc(layout) };
342 // This is the magic symbol to call the global alloc error handler. rustc generates
358 /// [`set_alloc_error_hook`]: ../../std/alloc/fn.set_alloc_error_hook.html
359 /// [`take_alloc_error_hook`]: ../../std/alloc/fn.take_alloc_error_hook.html
378 // For alloc test `std::alloc::handle_alloc_error` can be used directly.
380 pub use std::alloc::handle_alloc_error;