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

recommended that I post this question here:

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 for safety certification, I'm using C99 feature VLA.

The problem: I have noticed that instead of allocating its memory on the stack (like GCC, Clang, etc) TI VLAs are allocated on the heap.

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 guaranteed to free the memory properly?
Are VLAs RTOS safe?
Can I configure the compiler so it allocates VLA on the stack?

Regards, 
Gabriel