3 ms·
The problem is they implementing their own memory management on top of the standard primitives; they never sent unallocated memory to the client.
by gsnedders 9y ago
The problem is they implementing their own memory management on top of the standard primitives; they never sent unallocated memory to the client.
- the8472 9y agorust can also help you make custom memory management safer, e.g. there are several arena crates which hand out allocations with lifetimes, which means the arenas won't be freed before all references went out of scope. And there also is no pointer arithmetic into the arena, you only interact with individual allocations. I don't know if it would have prevented heartbleed, but it enables 3rd-party allocators to provide the same safety guarantees as the rust standard lib does. Something that cannot be said about C because there are no safety guarantees in C in the first place.
- klodolph 9y agoThere are some safety guarantees in C, it's just that Rust has more. Rust doesn't guarantee total safety, just like C doesn't mean no safety.