You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently alloc::oom just calls intrinsics::abort making the program look like it faulted, when really we killed it in a controlled manner. The reason it does that is that liballoc only assumes we have an allocator and no other OS/runtime.
However if oom was a lang item, we could implement it only in std, and have it print a message without allocating using
std::rt::abort("Allocator returned out of memory, aborting program")
no_std users could also opt into custom oom hooks, though they still have to crash the program.
We could also potentially add a flag for building std that makes oom unwind instead.
The text was updated successfully, but these errors were encountered:
Currently
alloc::oom
just callsintrinsics::abort
making the program look like it faulted, when really we killed it in a controlled manner. The reason it does that is that liballoc only assumes we have an allocator and no other OS/runtime.However if oom was a lang item, we could implement it only in std, and have it print a message without allocating using
no_std users could also opt into custom oom hooks, though they still have to crash the program.
We could also potentially add a flag for building std that makes oom unwind instead.
The text was updated successfully, but these errors were encountered: