使用liteos系统后空间总是不足,定义数组太大程序会死掉
[ERR] there's not enough whole to alloc 40c Bytes!
增大liteos任务栈空间会报错,以及增加启动文件里的堆栈后还是报错:[ERR] there's not enough whole to alloc 40c Bytes!
[ERR] pool [20002530, 0x20005000) conflict with pool [20002530, 0x20005000)
[ERR] osMemSystemInit error 1
初始化完成
指令操作失败
初始化成功
[ERR] pool [20002530, 0x20005000) conflict with pool [20002530, 0x20005000)
[ERR] osMemSystemInit error 1
初始化完成
指令操作失败
初始化成功
[ERR] pool [20002530, 0x20005000) conflict with pool [20002530, 0x20005000)
[ERR] osMemSystemInit error 1
初始化完成
之前用malloc开辟空间后可以使用,但开辟空间过大还是会回报错或者程序卡死,正常不带liteos系统时开辟空间都不会报错或卡死;
您遇到的内存问题可能是由于 LiteOS 系统对内存使用的限制导致的。LiteOS 对内存管理有自己的方式,可能会与 malloc 或 new 等 C/C++ 内存分配函数有冲突。您需要根据 LiteOS 的内存管理方式来管理和分配内存。建议您阅读 LiteOS 的内存管理文档并尝试使用 LiteOS 提供的内存管理函数来解决问题。