3 ms·
> I guess this assumes the stack goes down, but this direction metaphor in stacks has always confused me. What's up and what's down? The stack starts at the en
by ranger207 3y ago
> I guess this assumes the stack goes down, but this direction metaphor in stacks has always confused me. What's up and what's down?
The stack starts at the end of a process's memory space, so stack frame 0 has the highest possible memory address (ex 0xFFFF) and further stack frames have lower memory addresses (ex 0xFFF8). Now combine this with the fact that many visual representations of memory space have 0x0000 at the top and 0xFFFF at the bottom and the stack grows down by growing up and it all gets very confused