Explicit reference counts

J.J. Martin
{"title":"Explicit reference counts","authors":"J.J. Martin","doi":"10.1109/SECON.1996.510164","DOIUrl":null,"url":null,"abstract":"The paper advocates the routine use of explicit reference counts to manage storage in imperative language programs. While the principle of the method is not new-most text books on data structures describe it, albeit tersely-commercial software regularly uses ad hoc approaches to storage management; therefore an in-depth account of this effective and systematic method is indicated. The object to be managed are assumed to be instances of abstract data types or of object classes defined by modules. It is proposed to equip these objects with reference counts and the operations KEEP (increase reference count) and RELEASE (decrease reference count and, on zero, free the object). In class libraries these operations should be incorporated into the root classes and thus inherited by all classes. The method reference counts has the following merits: all deallocation decisions are based on considerations local to some module. Copying of data structures for simplifying deallocation decisions is avoided. The rules for using KEEP and RELEASE are simple and systematic. KEEP and RELEASE are used only to establish or revoke long-term claims to objects. The method is uniformly applicable to all types of objects (except recursive lists), mutable and immutable.","PeriodicalId":338029,"journal":{"name":"Proceedings of SOUTHEASTCON '96","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1996-04-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of SOUTHEASTCON '96","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SECON.1996.510164","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The paper advocates the routine use of explicit reference counts to manage storage in imperative language programs. While the principle of the method is not new-most text books on data structures describe it, albeit tersely-commercial software regularly uses ad hoc approaches to storage management; therefore an in-depth account of this effective and systematic method is indicated. The object to be managed are assumed to be instances of abstract data types or of object classes defined by modules. It is proposed to equip these objects with reference counts and the operations KEEP (increase reference count) and RELEASE (decrease reference count and, on zero, free the object). In class libraries these operations should be incorporated into the root classes and thus inherited by all classes. The method reference counts has the following merits: all deallocation decisions are based on considerations local to some module. Copying of data structures for simplifying deallocation decisions is avoided. The rules for using KEEP and RELEASE are simple and systematic. KEEP and RELEASE are used only to establish or revoke long-term claims to objects. The method is uniformly applicable to all types of objects (except recursive lists), mutable and immutable.
显式引用计数
本文提倡在命令式语言程序中常规使用显式引用计数来管理存储。虽然该方法的原理并不新鲜,但大多数关于数据结构的教科书都描述了它,尽管商业软件经常使用特殊的方法来进行存储管理;因此,对这种有效而系统的方法进行了深入的研究。要管理的对象被假定为抽象数据类型或由模块定义的对象类的实例。建议为这些对象配备引用计数和KEEP(增加引用计数)和RELEASE(减少引用计数,当为零时释放对象)操作。在类库中,这些操作应该合并到根类中,从而由所有类继承。方法引用计数有以下优点:所有的重新分配决策都基于对某个模块的局部考虑。避免了复制数据结构以简化重分配决策。使用KEEP和RELEASE的规则简单而系统。KEEP和RELEASE仅用于建立或撤销对对象的长期声明。该方法统一适用于所有类型的对象(除了递归列表),可变的和不可变的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信