Overhead of Thread Working Area in NIL and RT Topic is solved
Posted: Wed Aug 16, 2017 7:08 am
In the feature description of Nil it is said that tasks only take 7-24 Bytes of memory http://chibios.org/dokuwiki/doku.php?id ... l:features.
Out of curiosity I have compiled the NIL-ARMCM0-GENERIC example in demos/various/ and set the WA-size to 128 Bytes for thread1 and 256 Bytes for thread2. If I look into the .dmp file, I can see that waThread1 is 0x108 (=264) Bytes and waThread2 is 0x188 (=392) Bytes, which means, that the overhead in each work area is 136 Bytes. Obviously additional 136 Bytes are not the end of the world but I'm just curious because it was stated otherwise on the website. Does anybody know what the additional 136 Bytes are good for?
BTW: I have not touched the source of the example otherwise, including chconf.h. That means all OS-features except mutexes are enabled.
Out of curiosity I have compiled the NIL-ARMCM0-GENERIC example in demos/various/ and set the WA-size to 128 Bytes for thread1 and 256 Bytes for thread2. If I look into the .dmp file, I can see that waThread1 is 0x108 (=264) Bytes and waThread2 is 0x188 (=392) Bytes, which means, that the overhead in each work area is 136 Bytes. Obviously additional 136 Bytes are not the end of the world but I'm just curious because it was stated otherwise on the website. Does anybody know what the additional 136 Bytes are good for?
BTW: I have not touched the source of the example otherwise, including chconf.h. That means all OS-features except mutexes are enabled.