Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don’t follow. It’s exactly like C in this regard, except with Box::new instead of malloc.


The key difference as outlined in the article is that Box::new cannot fail in Rust, but the underlying malloc can.

In userspace it is rare enough that a Rust panic is considered acceptable behavior, but this is not the case for the kernel.

But, it is controllable for sure


Unsurprisingly the kernel's Box does not have Box::new it provides instead Box::try_new which is fallible.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: