Is heap shared between threads?

Thành Đạt

New member
Is heap shared between threads?
Answer
Heap – Since global variable is stored in the heap, heap is shared among threads. Stack – Since each thread can have its own execution sequence/code, it must have its own stack on which it might push/pop its program counter contents (when say function calls and returns happen).
 

Tìm kiếm

Back
Top