How to know that stack is growing upward/downward?

K

Keith Thompson

Alex Fraser said:
FWIW, I have only ever seen stack direction illustrated against a memory
diagram, which I have only ever seen drawn with high addresses at the top.


The listing is irrelevant to me (which I think explains my original post);
it's how the value of the stack pointer changes that defines the direction.


Hmm, I guess not. But I suspect the vast majority would mean as I described
above, don't you?

Perhaps; I honestly don't know. I remember being confused about it
many years ago; since then, I haven't given it much thought (I pretty
much stopped caring which way the stack grows).
 
R

Richard Bos

Yes. It is all about writing viruses for Windows. I thought we all
understood that.

Oh, bull. We understand nothing of the sort. There are quite legitimate,
even if in my opinion usually misguided, reasons for being interested in
the structure of the stack - for example, premature optimisation.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,197
Latest member
ScottChare

Latest Threads

Top