I am having a question regarding multithreading.
Does multiple threads of a given application share the same virtual address space? or does each thread has its own virtual address space?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Each process has its own virtual address space.
All the threads spawned within a process share the virtual address space of the process.
This is the reason that all the threads within the same process can access global variables defined within that process without any special mechanism, while processes need some sort of Inter-Process Communication(IPC) mechanism to share data variables.