4 points · by based2 · 7y ago · 1 comment
BTW the GNAT Ada runtime comes with a nice tool to monitor dynamically maximum stack usage : https://www.adacore.com/gems/gem-93-gnat-dynamic-stack-analy... . To be used during tests and qualification, to get a somewhat clear picture.
And to check for Stack Overflow in Ada at runtime compile with -fstack-check. The overhead is not so high and it saves from most of the stack corruption cases... Not all, especially if you're doing unsafe stuff...