Why Virtual Memory Address is the same in different process?

后端 未结 3 591
广开言路
广开言路 2020-12-11 07:55

\"http://i.stack.imgur.com/RGMsz.png\"

I know the virtual memory separates 2G(for kernel)/2G(for user) in Windo

3条回答
  •  醉梦人生
    2020-12-11 08:31

    Let me explicate it another way. Process X is running on machine A, and the same program is running as process Y on machine B. Does it matter if some global variable of your program takes same memory address on both machines? They are different! The same way, if that global variable is stored at XYZ location for one instance of process, another instance of process may have the same virtual address (XYZ) for that global variable.

提交回复
热议问题