It kind of doesn't at the moment. That's an area where Rust is ahead. They are working on a borrow-checker-like thing for Ada. But the archetypal Ada program allocates at initialization and not after that. That way it can't die from malloc failing, once it is past initialization.