Page 1 of 1

Thread Size

Posted: Thu Dec 08, 2016 2:42 pm
by tfAteba
Hi Giovanni,

I want to know how we can determine the minimum a thread size so that we just use the amount of memory needed?
Is there also a maximum while creating a thread?

Thank you.

Re: Thread Size

Posted: Thu Dec 08, 2016 3:13 pm
by Giovanni
Hi,

The debug plugin in ChibiStudio is able to report the amount of stack used, you may use the information to optimize the size. You need to activate the stack filling option in chconf.h.

Giovanni

Re: Thread Size

Posted: Thu Dec 08, 2016 4:21 pm
by tfAteba
Thanks for your answer Giovanni.

But I'm sorry, I'm not using ChibiStudio. My configuration is Ubuntu + Makefile + ChibiOS/RT.

So in this case is there a way do have the same functionality as your debug plugging for example or any other way?

Re: Thread Size

Posted: Fri Dec 09, 2016 11:51 am
by Giovanni
Hi,

Inspect stack areas and measure unused space by looking at the filler.

Giovanni

Re: Thread Size

Posted: Fri Dec 09, 2016 1:08 pm
by tfAteba
Thank you Giovanni.

I will look that tonight.