r/ProgrammerHumor • • Oct 20 '21

Meme Stack Overflow in a nutshell

Post image
3.9k Upvotes

117 comments sorted by

View all comments

9

u/Bo_Jim Oct 21 '21

Technically, stacks grow downward, so isn't the Stack Overflow logo upside down?

3

u/hayt88 Oct 21 '21

Never seen a stack of papers grow downwards

2

u/JuliaChanMSL Oct 21 '21

Well, I think the proper analogy would be to write something on the papers, going from the top. The stack of written on paper would then expand from the top. The stack is already there, your program only allocates part of it, writing on it while in use.

1

u/Bo_Jim Oct 21 '21

Correct. "Grow" probably isn't the best choice of words here, but it's the one that's commonly used. Heaps don't actually "grow" either. They just occupy more of the memory that already exists.

But yes, the minimum address that the stack occupies will decrease as the stack gets bigger, while the maximum address remains the same.