📄 6.2.1.htm
字号:
<html>
<head>
<title>编译原理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link type="text/css" rel="stylesheet" href="../css/specification.css">
</head>
<body>
<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='6.1.6.htm'"></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='6.2.1b.htm'"></img></td>
</tr>
</table>
<br><br>
<font class="title2"><b>6.2 存储组织:</b></font>
<table><tr><td>    </td>
<td class="content">
<p>
这一节中所讨论的运行时刻的存储组织的方式可以用于象Pascal和Fortran等语言。
</td></tr></table>
<hr size=2 color=red width=90%>
<br>
<font class="title2"><b>6.2.1 运行时刻内存的划分</b></font>
<table><tr><td>    </td>
<td class="content">
<P>
假设编译器从操作系统那里得到一个存储块以便被编译过的程序在其中运行。从上一节的讨论可知,运行时刻的存储空间必须划分以用来存放:
<BR>1. 生成的目标代码,
<BR>2. 数据目标,
<BR>3.用于保存过程活动踪迹的一个控制栈的副本。
</td></tr></table>
<table><tr><td>    </td>
<td class="content">
<p>
生成的目标代码的长度在编译时刻就确定了,因此编译器可以把它放在一个静态确定的区域内,譬如是内存的底端。同样,一些数据目标的大小在编译时刻是已知的,它们也可以放入静态确定的区域内。如图6.6所示。我们将尽可能多地对数据目标进行静态分配的原因是,这样一来这些目标的地址可以编入目标代码中。Fortran中的所有数据目标都可以进行静态分配。
</td></tr></table>
<br>
<center> <img src="6_6.gif" width="408" height="372" ></center>
<br>
<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='6.1.6.htm'"></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='6.2.1b.htm'"></img></td>
</tr>
</table>
</BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -