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.

[参考译文] AWR2944:R2944 中的存储器分配功能

Guru**** 2439710 points


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

https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1546546/awr2944-memory-allocate-function-in-r2944

器件型号:AWR2944


工具/软件:

您好、

请帮助我说明 R2944 中的内存分配函数可用于替换 R1843 中的 Memory_alloc ()?

我的 SDK 是 mmwave_mcuplus_sdk_04_06_00_00_01。

malloc () 或  

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

    您好:

    现在尝试使用 Heapp_alloc () 进行替换,因为它提供了与堆控制类似的功能。 它适合用于一般用途分配。 确保堆也配置正确。  

    此致、

    Gabriel

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

    您好、

    感谢您的答复。

    您能帮助我了解使用 MemoryP_xx 和 Heap_xx 有哪些不同吗?

    这看起来与我非常相似。

    此致、

    Bolong

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

    您好、

    如果在 R2944 中使用 malloc  () 函数替换 R1843 中的 Memory_alloc ()、 是否会产生错误?

    此致、

    Bolong

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

    您好:

    MemoryP_xx 未在 SDK 中使用、因此我不会使用它。 Heapp_alloc 函数在 HeapP_freertos.c 中的以下路径定义。

    C:\ti\mmwave_mcuplus_sdk_04_07_01_03\mcu_plus_sdk_awr294x_10_01_00_04\source\kernel\freertos\dp\common\HeapP_freertos.c

    您可以熟悉此处的代码。

    您想使用 malloc () 的具体原因是什么? 当然、如果做出这种更改、这可能会引入一些错误。 我最初推荐 Heapp_alloc ()

    此致、

    Gabriel