T
Tim Rentsch
Rui Maciel said:With malloc(), if it isn't possible to allocate memory then it returns a
null pointer. Therefore, an allocation failure is detected by testing the
pointer returned by malloc().
Can you point out how you would handle an allocation
failure caused by a VLA?
I have mentioned one particular idea in another thread.
My plan at this point is to start a new thread about it,
most likely in comp.std.c.
If he's talking about malloc() having a standard interface for
detecting allocation failures and VLAs not having such a
mechanism, that's beside the point I was making, since I was
explicitly talking about implementation-specific mechanisms.
This newsgroup is supposed to be about standard C. [snip elaboration]
It is, and what I'm talking about is what the Standard allows;
surely the subject is just as topical as other discussions about
what implementations are allowed to do in various obscure
circumstances. I thought the idea might be interesting to some
people here, which has been borne out by some other responses;
if it isn't interesting to you, please feel free to ignore any
further comments on the matter.