Take the 2-minute tour ×  As malloc returns NULL, is there any
way to detect that there is insufficient memory on the stack
using VLA's?  share|improve this question a stack fault comes to
mind. If you think the number may be unreasonable, don't gamble;
use malloc() –  WhozCraig Feb 28 '13 at 9:32 "If you have to
ask, you can't afford it." –  R.. Feb 28 '13 at 14:22  3 Answers
3  up vote 1 down vote accepted  There is nothing in C to
guarantee the success of declaring a VLA or checking for failure
regarding memory usage. This is the same for any declaration of
an automatic object, VLA or not.  share|improve this answer
Thanks for your answer, what's the behaviour when there is not
enough space for store automatic objects? the program doesn't
start because required space is know at runtime? it start but
crashes? (Excuse my poor english) –  Alter Mann Feb 28 '13 at
10:09 @DavidRF usually it starts to crash (segmentation fault
for example) soon after entering into the function, after the
declaration of the objec