Re: Thread stack
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Hi Mykhailo,Have a look at the following ECOS configuration options under the ISO C Library package: CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM - if not selected the app has to assign the stack. CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE - you would have to recompile the ecos configuration project each time you change this.
Either way you'll have to recompile the ecos config project at least once, but with the former, you would then only need to recompile the app each time to change the main thread's stack size.
Hope that helps, Andrew Parlane On 09/11/2011 07:34, Mykhailo Lytvyn wrote:
Hello all, it seems I have a problem with stack size in multi-threaded application. The stack size allocation before crush ("Bad next thread") is: Thread name: Idle Thread, Total stack: 4608, Stack used: 1140, Remaining in stack: 3468 Thread name: main, Total stack: 12288, Stack used: 12112, Remaining in stack: 176 Thread name: SharedMemoryReceiver, Total stack: 8192, Stack used: 3564, Remaining in stack: 4628 Thread name: task1, Total stack: 8192, Stack used: 3328, Remaining in stack: 4864 Thread name: task2, Total stack: 8192, Stack used: 3888, Remaining in stack: 4304 Thread name: task3, Total stack: 8192, Stack used: 368, Remaining in stack: 7824 Thread name: task4, Total stack: 8192, Stack used: 4328, Remaining in stack: 3864 Thread name: task5, Total stack: 8192, Stack used: 4960, Remaining in stack: 3232 It seems there is too small stack size in main thread (the free space in this stack decreased from 640 bytes at the beginning of software running to 176 at the very end). I would like to ask is this possible to increase stack size for the main thread without recompiling eCOS kernel? I have checked eCOS doc and does not see any good reference for stack issues. Can someone point me to good reference on this? Thank you in advance!
-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss