3 ms·
> Rust error handling is great for reliable systems. Last time I checked, Rust couldn't even catch malloc failures.
by nwellnhof 6y ago
> Rust error handling is great for reliable systems.
Last time I checked, Rust couldn't even catch malloc failures.
- wizzwizz4 6y agoTo be fair, these days malloc doesn't fail; your program crashes when it tries to use the memory, and there's nothing you can do about it. (But I agree that this is a problem with Rust's alloc system.)
- folmar 6y agoIt can, it just doesn't when the 0physical memory is exhausted, but there are other conditions $ ulimit -v 10240 < printf("%p\n", malloc(1024*1024*128)); > nil