What is the difference between Call Stack and Stack Trace?

后端 未结 3 807
眼角桃花
眼角桃花 2021-02-03 21:38

What is the difference between the terms \"Call Stack\" and \"Stack Trace\" ?

3条回答
  •  甜味超标
    2021-02-03 22:21

    I think Wikipedia does a fairly good job at distinguishing between them:

    a call stack is a stack data structure that stores information about the active subroutines of a computer program

    A stack trace is a report of the active stack frames at a certain point in time during the execution of a program.

    In other words, the call stack is the actual data structure in memory, while the stack trace is a snapshot of said data structure.

提交回复
热议问题