tks Alfred. In fact, tail-recursive function is only another style of recursion. You can say it equivalent to a looping, ok some how acceptable, but it does not resolve stackoverflow error because Stack still needs to store frame f(n) and wait for f(n -1). In term of memory, tail-recursive function is not different from normal recursion.
You can try it by making a factorial() function, debug it and look at the Frames tab, you will see all the frames from f(n) down to f(1) are stored in stack