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 和 malloc -如何正确使用堆栈

Guru**** 2390735 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1205940/rm46l852-vla-and-malloc---how-to-use-the-stack-properly

器件型号:RM46L852

大家好

建议我将此问题发布在此处:

我正在使用为 C11配置的 TI ARM 编译器(TI v20.2.7.LTS)构建一个工程。
由于不允许我使用动态内存分配进行安全认证、因此我使用的是 C99 Feature VLA。

问题:我注意到、TI Vlas 不是在堆栈中分配内存(比如 GCC、Clang 等)、而是在堆上分配的。

我已查看过  ARM 优化 C/C++编译器 v20.2.0.LTS 用户指南、未成功。

我更正说 VLA 实际上不使用堆栈吗?  
Vlas 是否保证了正常释放内存?
Vlas RTOS 是否安全?
我能否配置编译器以使其在栈上分配 VLA?

此致、  
加布里埃尔

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Unknown 说:

    可以

    Unknown 说:
    Vlas RTOS 是否安全?

    [quote userid="550002" url="~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1205940/rm46l852-vla-and-malloc---how-to-use-the-stack-properly 能否配置编译器使其在堆栈上分配 VLA?

    有关更多背景信息、请参阅 此论坛主题帖

    谢谢。此致、

    -George.