Page 1 of 1

Different value to clear initial register area

Posted: Mon Jan 13, 2020 9:44 am
by steved
This relates to the option to initialise stack areas. I hope I've correctly understood how Chibi works.
When a new thread is started, the registers appear to be loaded from the stack area, so all contain the stack initialisation value.
A fair number of registers are rarely used (if ever), so the stack initialisation value appears quite frequently between top of stack and lowest used location.
For speed, I use a binary search to establish available stack space, and that gets confused!
Would it be possible to initialise the top n bytes of the stack with a different value to avoid this problem?