3 ms·
I mean, that's just a register. The memory region itself is not special in any way, a random "heap" region that would be similarly frequently accessed would be
by kaba0 2y ago
I mean, that's just a register. The memory region itself is not special in any way, a random "heap" region that would be similarly frequently accessed would be just as fast.
- gus_massa 2y agoYou also can peek and write in the wrong side of BP and mess the "stack" of the caller funcion and perhaps get unexpected results or nasty crashes. Instead of "an ilusion", I'd say it's "a convension".
- unwind 2y agoExcept of course how return addresses are typically always stored on the machine stack. It is very concretely there and part of the programming model, in my world.
- gpderetta 2y agoTechnically some CPUs have a "jump and link" that saves the return address in a register. Then it is up to the calling convention to save that register on the, also by convention, stack.