Variable sized dynamic thread stacks from pool #87862
Unanswered
PhilippFinke1988
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everybody,
I'm currently working on a project where I need dynamically created threads having dynamically allocated stacks (via k_thread_stack_alloc()). It seems that I'm not able to use heap-allocated stacks (via CONFIG_DYNAMIC_THREAD_ALLOC) as my CPU, an ARM Cortex-A9 with MMU, doesn't support dynamic kernel objects so I'm bound to use the the stack pool via CONFIG_DYNAMIC_THREAD_POOL_SIZE.
The thread stack sizes in my system range from 2kB to 16kB. This means, with the current implementation of the thread stack pool, that each item in the pool needs to be at least 16kB in size which in turn wastes a lot of memory.
In order to get around this problem, I could imagine one of the following solutions:
What are your thoughts about it? Please let me know if these are feasible solutions or if you have other ideas.
Best regards,
Philipp
Beta Was this translation helpful? Give feedback.
All reactions