4 ms·
> the stack will hold all of the variables – this includes the local and the method call information That's not quite right. Method call data is passed in the
by ternaryoperator 2y ago
> the stack will hold all of the variables – this includes the local and the method call information
That's not quite right. Method call data is passed in the local variable fields of the method's frame, not on the stack.
- hickelpickle 2y agoThe frame data is still stored on the stack with the parameters being passed residing in the first part of the locals section of the frame, that way as the values already residing on the stack can overlap into the next stack frame. The spec doesn't specify that is has to be this way, so technically stack frames can be in non contiguous memory but afaik this is not common.