Is stack in CPU or RAM?

abiati madana picture abiati madana · Mar 15, 2013 · Viewed 15.3k times · Source

I have a few question about stack.

  1. Is stack in CPU or RAM?
  2. Is stack a place to run OPcode?
  3. Is EIP in CPU or RAM?

Answer

unxnut picture unxnut · Mar 15, 2013

Stack is always in RAM. There is a stack pointer that is kept in a register in CPU that points to the top of stack, i.e., the address of the location at the top of stack.