Closed SirWumpus closed 2 months ago
Added guard over/under flow regions around each stack that can be safely stepped.
Not enough to add the guard regions, should check them too (dah).
This should replace stack size checking, which given the current implementation is way less efficient and eats CPU in a paranoid attempt to catch over and under flows as soon as possible.
Will probably keep the old code, but default it to disabled.
To avoid damage due to a small overflow/underflow, some amount of cells can be reserved in both sides of the stack (say, 8 or 16).
Originally posted by @ruv in https://github.com/SirWumpus/post4/issues/7#issuecomment-2271622514