Linux has overcommit so failing malloc hasnt been a thing for over a decade. Zig is late to the party since it strong arms devs to cater to a scenerio which no longer exists.
Also malloc can fail even with overcommit, if you accidentally enter an obviously incorrect size like -1.