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.

6678 内存释放失败

Other Parts Discussed in Thread: SYSBIOS

我在6678已有的image processing上做算法移植。

整个工程已经编译通过,也可以运行。但是多次运行时,存在一个问题。

我在0核上进行了内存的分配和释放,是将8个核使用的内存都进行了分配,然后将地址作为消息内容发给其他核。

调用Memory_alloc函数进行buffer分配,使用完毕后,再调用Memory_free进行释放。

在运行程序时,第一次运行没有问题,但是第二次运行时,程序的执行没有问题,但是进行释放时就会出现断言错误:

[C66xx_0] ti.sysbios.heaps.HeapMem: line 329: assertion failure: A_invalidFree: Invalid free

[C66xx_0] xdc.runtime.Error.raise: terminating execution

但是此时需要释放的buffer地址显示和分配的时候一样,应该是没有问题的。

而且,和buffer释放的顺序没有关系,并总是在第二次执行程序时出现这个错误。

请问是什么原因造成的?

我应该如何解决呢?