Re:Once upon a time, memory allocators made sense
by dragontamer on Tuesday January 19, 2016 @12:05PM
(#10932028)
> Dereferencing null is undefined behavior in a C program - which is another way of saying it is considered an error, and there are no guarantees about what will happen as a result of it.
Indeed. It is undefined within C. It is an abstraction that C builds on top of. Dereferencing 0 on the vast majority of embedded systems (or kernel-level code) is very well defined.
This is just one of the areas where C has a "leaky abstraction".
Indeed. It is undefined within C. It is an abstraction that C builds on top of. Dereferencing 0 on the vast majority of embedded systems (or kernel-level code) is very well defined.
This is just one of the areas where C has a "leaky abstraction".