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.

c6678 image_processing buffer的空间分配和释放



1.为什么image processing里的边缘检测中用到的scratch_buffer要在master core上分配,然后传给从核,从核在使用?为什么不在slave cores上做buffers的分配和释放?

2.我在slave core的算法代码中添加几个buffers的malloc操作,但在算法结束时free,却报错invalid free,这为什么?

3.slave.cfg中定义两个heap,一个bios.heap;另一个名为heap0的heapMem,且此heap0为defaultheap,那memory_alloc(NULL,...)到底是在哪里分配的呢?我在ccs的content help中看memory_alloc,说第一个参数为NULL时,从defaultheap中分配空间;而slave.cfg文件中的runtime下注明说memory_alloc第一个参数为NULL时分配biosheap空间。

4.我测试了下3中的问题,发现memory_alloc(NULL,...)似乎是在heapMem上分配了,但却报出out of memory,所有我想将slave.cfg中的heapMem的大小设置更大,但将原本的0x8000改大后却怎么也编译不过,难道heapMem的大小不能改么?