C99 uses a resizable array, which you can use and resize it to a larger one. However, this scalable array is implemented using alloca. Here is a sample code on UNIX env :
#include <stdio.h>
#include <alloca.h>
#include <stdlib.h>
#include <stdbool.h>
int
main()
{
while (true)
{
void *p = alloca(32UL);
printf("new memory allocated at %p \n", p);
}
exit(EXIT_SUCCESS);
}
:
new memory allocated at 0xbf800a60
new memory allocated at 0xbf800a30
new memory allocated at 0xbf800a00
new memory allocated at 0xbf8009d0
new memory allocated at 0xbf8009a0
[1] 3977 segmentation fault ./a.out
alloca malloc, , , .