为什么虚拟内存地址是在不同的过程一样吗? [英] Why Virtual Memory Address is the same in different process?

查看:138
本文介绍了为什么虚拟内存地址是在不同的过程一样吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道虚拟内存2G分离(内核)/ 2G(用户)在Windows中。
但是,为什么变量的地址是不是不断叠加?

I know the virtual memory separates 2G(for kernel)/2G(for user) in Windows. But why the address of variable isn't stack continually?

喜欢0x22ff74,0x22ff78,0x22ff82,0x22ff86?这是否意味着Windows中使用沙盒机制,用户进程?

Likes 0x22ff74,0x22ff78,0x22ff82,0x22ff86 ? Does it mean that Windows use sandbox mechanism in user process?

推荐答案

这就是虚拟内存的到底是什么。操作系统提供了自己的私有地址空间每个程序。在现实中,操作系统负责映射这些虚拟地址返回到物理地址空间,而不应用意识到的

That's exactly what virtual memory is. The operating system provides each program with its own private address space. In reality the operating system is in charge of mapping those virtual addresses back to the physical address space without the application being aware.

正如大家注意到,这意味着两个应用程序可具有驻留在程序相同的虚拟地址不同的数据。

As you noticed this means that two applications can have different data residing at the same virtual address in the program.

了解更多关于虚拟内存这里

Read more about virtual memory here.

这篇关于为什么虚拟内存地址是在不同的过程一样吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆