科技报告详细信息
Garbage Collection in the Next C++ Standard
Boehm, Hans-J. ; Spertus, Mike
HP Development Company
关键词: C++;    garbage collection;   
RP-ID  :  HPL-2009-360
学科分类:计算机科学(综合)
美国|英语
来源: HP Labs
PDF
【 摘 要 】

C++ has traditionally relied on manual memory management. Sometimes this has been augmented by limited reference counting, implemented in libraries, and requiring use of separate pointer types. In spite of the fact that conservative garbage collectors have been used with C for decades, and with C++ for almost as long, they have not been well-supported by language standards. This in turn has limited their use. We have led an effort to change this by supporting optional "transparent" garbage collection in the next C++ standard. This is designed to either garbage collect or detect leaks in code using normal unadorned C++ pointers. We initially describe an ambitious effort that would have allowed programmers to explicitly request garbage collection. It faced a number of challenges, primarily in correct interaction with existing libraries relying on explicit destructor invocation. This effort was eventually postponed to the next round of standardization. This initial effort was then temporarily replaced by minimal support in the language that officially allows garbage collected implementations. Such minimal support is included in the current committee draft for the next C++ standard. It imposes an additional language restriction that makes it safe to garbage collect C++ programs. Stating this restriction proved subtle. We also provide narrow interfaces that make it easy to both correct code violating this new restriction, and to supply hints to a conservative garbage collector to improve its performance. These provide interesting implementation challenges. We discuss partial solutions.

【 预 览 】
附件列表
Files Size Format View
RO201804100002487LZ 255KB PDF download
  文献评价指标  
  下载次数:16次 浏览次数:20次