3 ms·
>checking the return of any allocation call I would say this is pointless on many modern systems unless you also disable overcommit, since otherwise any memory
by PhilipRoman 2y ago
>checking the return of any allocation call
I would say this is pointless on many modern systems unless you also disable overcommit, since otherwise any memory access can result in a crash, which is impossible to check for explicitly.
- kevin_thibedeau 2y agoabort() isn't an option on all modern systems.
- josephg 2y agoIt’s an option on most systems. Maybe not in embedded work - but in that case you might want to preallocate memory anyway.
- lionkor 2y agoMost code correctness is pointless until it isn't, yes