Skip to content

Commit 6c6958b

Browse files
authored
Rollup merge of #95365 - mkroening:hermit-alloc-error-handler, r=joshtriplett
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``
2 parents f1f721e + 8f47635 commit 6c6958b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/alloc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ pub const fn handle_alloc_error(layout: Layout) -> ! {
387387
#[cfg(all(not(no_global_oom_handling), test))]
388388
pub use std::alloc::handle_alloc_error;
389389

390-
#[cfg(all(not(no_global_oom_handling), not(any(target_os = "hermit", test))))]
390+
#[cfg(all(not(no_global_oom_handling), not(test)))]
391391
#[doc(hidden)]
392392
#[allow(unused_attributes)]
393393
#[unstable(feature = "alloc_internals", issue = "none")]

0 commit comments

Comments
 (0)