recursion using only heap area

前端 未结 6 1670
你的背包
你的背包 2021-02-10 08:51

Are there examples of recursion using only heap area?

6条回答
  •  不思量自难忘°
    2021-02-10 09:07

    In many implementations, arguments to a function call are stored on the stack. Information such as the address to return to may also be stored on the stack. Thus having a recursive function without using the stack may not be feasible.

    Check your compiler documentation to see if a function can be called without using any room on the stack. If so, you are on your way.

提交回复
热议问题