运行程序时实际加载到 RAM 中的是什么? [英] What actually is loaded into RAM when you run a program?

查看:102
本文介绍了运行程序时实际加载到 RAM 中的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您为特定进程运行程序时,实际加载到 RAM 中的是什么?

What actually is loaded into RAM when you run a program for that particular process?

推荐答案

冒着过于简单化的风险,在现代系统中,当您运行程序时,很少会加载到 RAM 中.程序加载器读取可执行文件并按照其中包含的指令将各种页面映射到文件.

At the risk of oversimplification, in modern systems little gets loaded into RAM when you run a program. The program loader reads the executable file and follows the instructions it contains to map the various pages to files.

当程序开始运行时,它会在第一次需要内存时产生页面错误,操作系统会根据需要从磁盘加载数据.

As the program starts running, it generates page faults when it needs memory for the first time and the operating system loads the data from disk as needed.

这篇关于运行程序时实际加载到 RAM 中的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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