Skip to content

Commit

Permalink
Rollup merge of #95365 - mkroening:hermit-alloc-error-handler, r=josh…
Browse files Browse the repository at this point in the history
…triplett

Use default alloc_error_handler for hermit

Hermit now properly separates kernel from userspace.
Applications for hermit can now use Rust's default `alloc_error_handler` instead of calling the kernel's `__rg_oom`.

CC: ``@stlankes``
  • Loading branch information
JohnTitor committed May 14, 2022
2 parents f1f721e + 8f47635 commit 6c6958b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ pub const fn handle_alloc_error(layout: Layout) -> ! {
#[cfg(all(not(no_global_oom_handling), test))]
pub use std::alloc::handle_alloc_error;

#[cfg(all(not(no_global_oom_handling), not(any(target_os = "hermit", test))))]
#[cfg(all(not(no_global_oom_handling), not(test)))]
#[doc(hidden)]
#[allow(unused_attributes)]
#[unstable(feature = "alloc_internals", issue = "none")]
Expand Down

0 comments on commit 6c6958b

Please sign in to comment.