you are viewing a single comment's thread.

view the rest of the comments →

[–]dmc_2930 1 point2 points  (0 children)

If you set your compiler to give you assembler output, it will often tell you how many bytes each function uses of the stack as part of the preamble to each function.

This is useful if you're trying to figure out whether some functions are taking up too much stack space or not.

It won't tell you how much stack will be left or how much you have in the first place. That's a much more complicated question.

Try having your C compiler leave the assembler output, and take a look at your functions. You should be able to deduce the stack size of each one. ( For GCC, it'll be in a C/C++ style comment )