进程段(堆栈、堆、数据和代码)在内存中是连续的吗? [英] Process segments(stack,heap,data and code) are contiguous in memory?

查看:76
本文介绍了进程段(堆栈、堆、数据和代码)在内存中是连续的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能不能帮个忙,所有属于进程的段在内存中是连续的吗?如果是,那么为什么这些应该是连续的?.

Can some body help, does all segments belongs to process are contiguous in the memory? if yes then why those should be in contiguous?.

根据我的理解,堆栈下降,堆增长(取决于 CPU 架构),这表明所有段都一一排列(紧密耦合).

as per my understanding stack comes down and heap grows up(depends on CPU architecture) that shows all segments lay one by one(tightly coupled).

推荐答案

在虚拟内存中的 x86 上是的,从进程的角度来看,它们是连续的,但这些段的部分可以映射到任何随机的物理内存部分.

On x86 in virtual memory yes they are contiguous from processes point of view but the portions of these segments can be mapped to any random physical memory portions.

这篇关于进程段(堆栈、堆、数据和代码)在内存中是连续的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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