From: Linus Torvalds
> Sent: 14 April 2021 21:22
> 
> On Wed, Apr 14, 2021 at 1:10 PM Matthew Wilcox <wi...@infradead.org> wrote:
> >
> > There's a philosophical point to be discussed here which you're skating
> > right over!  Should rust-in-the-linux-kernel provide the same memory
> > allocation APIs as the rust-standard-library, or should it provide a Rusty
> > API to the standard-linux-memory-allocation APIs?
> 
> Yeah, I think that the standard Rust API may simply not be acceptable
> inside the kernel, if it has similar behavior to the (completely
> broken) C++ "new" operator.

ISTM that having memory allocation failure cause a user process
to exit is a complete failure in something designed to run as
and kind of service program.

There are all sorts of reasons why malloc() might fail.
You almost never want a 'real' program to abort on one.

        David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, 
UK
Registration No: 1397386 (Wales)

Reply via email to