Might sound like a silly question but I just wondered how many different stack areas there are in memory with say 4 CPU cores (if this really depends on the number of CPUs at all)?
To my knowledge at some point during boot before the execution of the first C function within the bootloader, somewhere in memory there'll be created an area reserved for a single stack. Since at this point (with only one running CPU core) there is only one single thread I guess only one single stack area will be created.
Then as soon as the other 3 CPUs are turned on, 3 other stacks are created. I guess every kernel thread will have it's own stack area and every user process and thread as well.
Is this naive assumption correct? Not sure if SO is the right place to post this question, but since it's STACKoverflow I guess it is. SU does not even have a proper stack tag.