4 ms·
Sure, but (a) it can handle the malloc failure and (b) it's pretty easy for the user to find the bad guy.
by paulddraper 10y ago
Sure, but (a) it can handle the malloc failure and (b) it's pretty easy for the user to find the bad guy.
- deathanatos 10y agoIt might handle the malloc failure by crashing. Some languages (e.g., Rust) and runtimes (e.g., glib) presume that small allocations always succeed; a failure in such an allocation immediately crashes the program (as the underlying API provides no means to report the failure).
- steveklabnik 10y agoRust the language doesn't know anything about allocation; it's entirely a standard library decision.
- mikeash 10y ago(a) it probably won't therefore (b) the "bad guy" is going to be most/all processes.