rt-thread icon indicating copy to clipboard operation
rt-thread copied to clipboard

[Feature] thread stack 相关提案

Open polarvid opened this issue 1 year ago • 2 comments

Describe problem solved by the proposed feature

需求

  • [ ] thread stack 支持架构定义阈值,避免中断上下文直接导致栈溢出.
  • [ ] thread stack 动态分配方式支持配置。可以(在 smart 上)通过 page 管理器(或其他专用池?)分配。因为 memheap 使用一段时间后产生碎片化,可能分配不出 KB 级别数据.

Describe your preferred solution

No response

Describe possible alternatives

No response

polarvid avatar Aug 26 '24 02:08 polarvid

支持,测试用例都是什么鬼东西,栈大小全是写死的

GuEe-GUI avatar Aug 27 '24 01:08 GuEe-GUI

是否考虑设置专门的中断栈,在异常/中断的时候上下文保存在当前被中断的任务栈上,保存上下文后切换到中断栈执行后续的中断处理,这样在有中断嵌套或者isr占用栈空间过大时不会导致thread的栈溢出。

zhangjing0303 avatar Oct 10 '24 01:10 zhangjing0303