Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

Borrow, copy or steal?: loans and larceny in the orthodox canonical form

Borrow, copy or steal?: loans and larceny in the orthodox canonical form Dynamic memory management in C++ is complex, especially across the boundaries of library abstract data types. C++ libraries designed in the orthodox canonical form (OCF) alleviate some of the problems by ensuring that classes which manage any kind of heap structures faithfully copy and delete these. However, in certain common circumstances, OCF heap structures are wastefully copied multiple times. General reference counting is not an option in OCF, since a shared body violates the intended value semantics; although a copy-on-write policy can be made to work with borrowed heap structures. A simpler ownership policy, based on larceny, allows low-level memory manager objects to steal heap structures from temporary variables, in properly isolated circumstances. Various strategies for regulating theft are presented, ranging from pilfer-constructors to locks on heap data. Larceny has similarities with other transfer of ownership patterns, but is more a core implementation technique designed to improve the efficiency and effectiveness of OCF-conformant libraries. http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png ACM SIGPLAN Notices Association for Computing Machinery

Borrow, copy or steal?: loans and larceny in the orthodox canonical form

ACM SIGPLAN Notices , Volume 33 (10) – Oct 1, 1998

Loading next page...
 
/lp/association-for-computing-machinery/borrow-copy-or-steal-loans-and-larceny-in-the-orthodox-canonical-form-9napqh7zWU

References

References for this paper are not available at this time. We will be adding them shortly, thank you for your patience.

Publisher
Association for Computing Machinery
Copyright
Copyright © 1998 by ACM Inc.
ISSN
0362-1340
DOI
10.1145/286942.286948
Publisher site
See Article on Publisher Site

Abstract

Dynamic memory management in C++ is complex, especially across the boundaries of library abstract data types. C++ libraries designed in the orthodox canonical form (OCF) alleviate some of the problems by ensuring that classes which manage any kind of heap structures faithfully copy and delete these. However, in certain common circumstances, OCF heap structures are wastefully copied multiple times. General reference counting is not an option in OCF, since a shared body violates the intended value semantics; although a copy-on-write policy can be made to work with borrowed heap structures. A simpler ownership policy, based on larceny, allows low-level memory manager objects to steal heap structures from temporary variables, in properly isolated circumstances. Various strategies for regulating theft are presented, ranging from pilfer-constructors to locks on heap data. Larceny has similarities with other transfer of ownership patterns, but is more a core implementation technique designed to improve the efficiency and effectiveness of OCF-conformant libraries.

Journal

ACM SIGPLAN NoticesAssociation for Computing Machinery

Published: Oct 1, 1998

There are no references for this article.