>>84[citation needed]
Check our discussion, there was no talk about algorithms.
This is an OS issue, not a C Standard issue
Actually it's an implementation issue.
Regardless of what language your program is written in, accessing illegal memory is a segmentation fault.
And this is wrong, the implementation is free to do whatever it wants as it is UB.
however anything that isn't either EXIT_SUCCESS or 0 should be interpreted as indicating failure.
I disagree, the standard disagrees as well.
Those assumptions were chosen to simplify the discussion of the algorithm.
We are not talking about any algorithm, in fact no algorithm was posted in this thread.
>>88on a real computer, it would return with failure result
A real compiler on a real computer is free to optimise the loop by not including any of the code inside it or gc ptr.
on a Turing machine it would never exit
Except if the implementation of malloc for some reason returned NULL.
Why are you using uint8_t? Don't you know that it is considered optional and some implementations don't or can't include it? Your code doesn't even have a need for it, you could just use char instead.
as on a real machine, repeated calls to malloc() without calling free() should eventually use up all available memory and cause malloc() to return a null pointer
This is wrong, see above.
Again, we're to assume garbage collection (if available in the implementation) is disabled, and optimization is disabled, so the machine code generated is as close to possible to the source code.
Way too many assumptions. I thought that you wanted to talk about ``real machine''s.