Which of the following components of program state is shared across threads in a multi-threaded process?
- Register values
- Heap Memory
- Global Variables
- Stack memory
My suggestion; Only global variables, global variables are allocated on the heap? So Heap memory and Global Variables. Is this correct?
Heap memory always.
Global variables depends on platform, usually they are shared.
Stack is thread-specific, as well as registers.