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.

[参考译文] RTOS/CC2640R2F:尽管有足够的可用存储器、但 iCall_malloc 仍然失败

Guru**** 2539500 points


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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/632416/rtos-cc2640r2f-icall_malloc-fails-despite-enough-free-memory

器件型号:CC2640R2F

工具/软件:TI-RTOS

您好!

当我们尝试进行配对和绑定时、我们会遇到一个奇怪的问题、即尽管有足够的可用内存、但我们仍然无法执行 malloc (请参阅下面的内容)。

HEAPMGR_SIZE 无符号整型8136 0x20001B58
heapmgrMemAlo unsigned int 3288 0x20000864
heapmgrMemMax unsigned int 4604 0x20000868
heapmgrMemFail unsigned short 1564 0x20000870
大小无符号 int 56寄存器 R4
heapmgrMemUB unsigned int 4700 0x2000086C

我们在 rtos_heaposal.h 中失败:

hdr =(heapmgrHdr_t *)((hmU8_t *) hdr + tmp);

tmp =* HDR;
如果(tmp =0)

  HDR =空;
  中断;

老实说、我们现在已经很迷失了、您是否有任何指向哪里的指针、因为我们有超过4K 的可用 RAM、并且未成功分配56个字节(如果需要、包括标头大小和对齐)。

我们非常感谢您的任何帮助

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

    最大可用块的大小是多少? 如果你有一个碎片堆、那么它可能找不到一个连续的自由块。

    祝你一切顺利