【发布时间】:2018-07-25 10:43:45
【问题描述】:
据我所知,当一个进程分配局部变量时,它通过将它们作为堆栈推入内存来实现,但仍然通过使用堆栈指针的偏移量来引用它们(来自这个线程What is the idea behind using a stack for local variables?)。
但是,它如何知道哪些变量具有哪些偏移量?我是否以正确的方式考虑这个问题?
【问题讨论】:
标签: c assembly memory-management cpu-architecture