This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM46L852: VLA and malloc - How to use the stack properly

Part Number: RM46L852

Hi,

I'm building a project using the TI ARM compiler (TI v20.2.7.LTS) configured for C11.
Because I'm not allowed to use dynamic memory allocation, I'm using C99 feature VLA.

The problem: by inspecting the internal of the VLA, I'm noticing that allocating a VLA calls __vla_alloc() that will use malloc to allocate memory.

I have looked in the ARM Optimizing C/C++ Compiler v20.2.0.LTS User's Guide without success.

I'm I correct that VLA actually does not use the stack? 
Are VLAs guaranty to free the memory properly?
Are VLAs RTOS safe?
Is there a way to use those safely? 
Is there an alloca function in the std library?

Regards, 
Gabriel