请教一下TI的工程师,
有两个Task,创建方法: (OSI_STACK_SIZE=2048)
osi_TaskCreate(Task, (const signed char*) "Task", OSI_STACK_SIZE, NULL, APP_TASK_PRIORITY, NULL);
一个Task 往队列里添加数据,会使用malloc() 申请内存,每次大概100个字节
一个Task从队列里取出数据,使用完后,释放 内存。
队列里面节点个数 不超过5个,
但长时间运行时, 却在 入队列Task完成后, 出队列读取到数据,使用时,程序就奔溃了。
请问这是什么原因?
OSI_STACK_SIZE 不是指 TASK最大申请内存的大小吧?
th smi:
如果是 Malloc函数导致Heap分配不足, 程序里 malloc 和 free 是成对出现的。 而且队列中 正常只有1-2个数据。2-300个字节
而且程序奔溃,都没有任何错误提示。。
th smi:
回复 th smi:
cc3200.icf 中 应该修改成多少 比较合适?
define block HEAP with alignment = 8, size = 0x00008000 { };
keep {readonly section .cmdtbl};
define block CmdTbl {section .cmdtbl };
th smi:
回复 th smi:
8000 指的是多大的内存了?
th smi:
回复 th smi:
th smi:
回复 th smi:
两个TASK,每3秒 完成一次 进队列 出队列, 程序1个小时左右 就奔溃了。求解答。。。
th smi:
回复 th smi:
有人回复吗?
程序奔溃没有一点错误提示,直接卡死,定位了好久 才知道是 malloc这里的问题。
th smi:
回复 th smi:
在线求解答
Viki Shi:
参考: e2echina.ti.com/…/486557
th smi:
回复 Viki Shi:
这是两个问题
th smi:
回复 Viki Shi:
请教一下 CC3200 watchdog 问题:
e2echina.ti.com/…/167083