虚拟地址何时分配给程序/进程? [英] When does the virtual addresses are assigned to a program/process?

查看:20
本文介绍了虚拟地址何时分配给程序/进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这对很多人来说可能听起来很愚蠢,但我想对这个话题有清楚的了解.例如:当我们在linux(ubuntu,x86)上构建一个C程序时,它会在编译和链接过程成功后生成a.out.a.out 包含什么类型的地址?是虚拟地址吗?如果不是,那么虚拟地址将在哪一步(从构建程序到将其加载到内存中)发挥作用?

This might sound very silly question to many but i want to have clear understanding on this topic. For example: when we build a C program on linux(ubuntu, x86) which would generate a.out after successful compilation and linking process. What type of addresses a.out contains ? Is it virtual address ? If not then in which step (from building a program to loading it into the memory) the virtual address will come into play?

推荐答案

编译器生成地址.链接器生成地址.它们只是地址.

Compilers generate addresses. Linkers generate addresses. They are just addresses.

如果您在没有逻辑地址转换的系统上进行开发或运行,这些地址将被解释为物理地址.

If you do development or run on a system without logical address translation, those addresses are interpreted as physical addresses.

如果您在使用逻辑地址转换的系统上进行开发或运行,这些地址将被解释为逻辑地址.

If you do development or run on a system that uses logical address translation, those addresses are interpreted as logical addresses.

a.out 包含什么类型的地址?是虚拟地址吗?

What type of addresses a.out contains ? Is it virtual address ?

它包含未指定类型的地址.

It contains addresses of unspecified type.

如果不是,那么虚拟地址将在哪一步(从构建程序到将其加载到内存中)发挥作用?

If not then in which step (from building a program to loading it into the memory) the virtual address will come into play?

这完全取决于处理器如何解释这些地址.

This is entirely the function of how the processor interprets those addresses.

这篇关于虚拟地址何时分配给程序/进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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