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
On the Allocating Memory page it is said that the oom langitem aborts the program by executing an "illegal cpu instruction":
The standard library calls std::alloc::oom(), which in turn calls the the oom langitem. By default this just aborts the program by executing an illegal cpu instruction.
I've checked the code and found out that the alloc lib actually calls std::sys::abort_internal in rust_oom (alloc::alloc::handle_alloc_error → std::alloc::rust_oom), which resolves for example into a libc::abort call on unix, which doesn't call any illegal instructions in my understanding but rather sends a SIGABRT to the process.
Please correct me if I'm wrong, it might be that I've got the whole idea wrong, but I believe that phrase
. By default this just aborts the program by executing an illegal cpu instruction.
should be replaced with something like
, which aborts the program in a platform-specific manner.
Thanks!
The text was updated successfully, but these errors were encountered:
On the
Allocating Memory
page it is said that theoom
langitem aborts the program by executing an "illegal cpu instruction":I've checked the code and found out that the
alloc
lib actually callsstd::sys::abort_internal
inrust_oom
(alloc::alloc::handle_alloc_error
→std::alloc::rust_oom
), which resolves for example into alibc::abort
call on unix, which doesn't call any illegal instructions in my understanding but rather sends aSIGABRT
to the process.Please correct me if I'm wrong, it might be that I've got the whole idea wrong, but I believe that phrase
should be replaced with something like
Thanks!
The text was updated successfully, but these errors were encountered: