李呜山. TQ-16计算机ALGOL编译系统数组存贮动态分配[J]. 武汉大学学报 ( 信息科学版), 1980, 5(2): 65-71.
引用本文: 李呜山. TQ-16计算机ALGOL编译系统数组存贮动态分配[J]. 武汉大学学报 ( 信息科学版), 1980, 5(2): 65-71.
Li Mingshan. Dynamic Allocation for the Array Storage of ALGOL Compiler System for Computer TQ-16[J]. Geomatics and Information Science of Wuhan University, 1980, 5(2): 65-71.
Citation: Li Mingshan. Dynamic Allocation for the Array Storage of ALGOL Compiler System for Computer TQ-16[J]. Geomatics and Information Science of Wuhan University, 1980, 5(2): 65-71.

TQ-16计算机ALGOL编译系统数组存贮动态分配

Dynamic Allocation for the Array Storage of ALGOL Compiler System for Computer TQ-16

  • 摘要: TQ-16机ALGOL编译系统对数组存贮采用静态分配方法。本文给出了数组存贮的动态分配方法,即对数组(常界或变界)根据其在程序运行阶段的实际体积分配存贮,而对过程体中说明的数组,则只当该数组所属的过程被调用时才分配存贮,调用结束,数组所占存贮立即释放。因此,数组存贮动态分配能更有效地使用内存。此外,TQ-16机ALGOL编译系统对数组界偶的上、下界只允许是常数或非形参简变,本文给出的方法,还允许界偶的上、下界是标准变量、赋值形参和换名形参,这对编程序带来了方便,并提高了程序的灵活性。按本文给出的方法修改的编译,已于一九七九年十二月在我院计算站投入试用。从调试和试用情况来看,达到了预期的目的,对大多数实用程序,实际计算时间无明显增加,而编译时间有所减少。

     

    Abstract: In this paper the author gives a method of dynamic allocation for the array storage of ALGOL compiler system for computer TQ-16 and also the direction for its use.Static allocation is usually adopted for the array storage of ALGOL compiler system for TQ-16.If we now use the dynamic allocation for the array storage,the internal storage will more efficiently be utilized.From the result of debugging and practice the expected aim and purpose can be achieved.For most practical programs,the real computing time does not increase evidently,while the compiling time reduces comparatively.

     

/

返回文章
返回