首页 | 本学科首页   官方微博 | 高级检索  
     


A heap-based implementation of the programming language Pascal
Authors:C D Marlin
Abstract:The implementation of Pascal known as Pascal ‘P’ was modified so that activation records for blocks (procedures and functions) were no longer allocated on a stack, but were instead allocated on a heap. This was done partly to test the feasibility of using Pascal ‘P’ for experimenting with extensions to Pascal, and partly to assess the efficiency of implementing Pascal procedures and functions in this way. The necessary changes to Pascal ‘P’ are described; where alternative strategies were possible, these are outlined and the reasons for the final choice given. The heap management algorithms used are presented and, in particular, their behaviour when managing the activation records of Pascal programs which do not involve dynamic variables is explained. Quantitative comparisons are made between Pascal ‘P’ and the version with heap-allocated activation records, to assess their relative efficiencies; these comparisons indicate that the modified system uses more storage, but it gives rise to only slightly longer execution times. Alternative heap management algorithms are discussed. Finally, some advantages of heap-allocated activation records are presented.
Keywords:Heap management  Pascal  Heap-allocated activation records  Pascal ‘  P’    Ackermann's function
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号