stack check

how to check total stack size used by  any function and requird stack size of same function