skip to main content
article
Open Access

Managing Reentrant Structures Using Reference Counts

Authors Info & Claims
Published:01 July 1980Publication History
Skip Abstract Section

Abstract

Automatic storage management requires that one identify storage unreachable by a user's program and return it to free status. One technique maintains a count of the references from user's programs to each cell, since a count of zero implies the storage is unreachable. Reentrant structures are self-referencing; hence no cell in them will have a count of zero, even though the entire structure is unreachable. A modification of standard reference counting can be used to manaage the deallocation of a large class of frequently used reentrant structures, including two-way and circularly linked lists.

All the cells of a potentially reentrant structure are considered as part of a single group for deallocation purposes. Information associated with each cell specifies its group membership. Internal references (pointers from one cell of the group to another) are not reference counted. External references to any cell of this group are counted as references to the group as a whole. When the external reference count goes to zero, all the cells of the group can be deallocated. This paper describes several ways of specifying group membership, properties of each implementation, and properties of mutable and immutable group membership.

References

  1. 1 FENICHEL, R.R. List tracing in systems allowing multiple cell-types. Commun. ACM 14, 8 (Aug. 1971), 522-526. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 FRIEDMAN, D.P., AND WINE, D.S. Reference counting can manage the circular environments of mutual recursion. Inform. Process. Lett. 8, 1 (1979).Google ScholarGoogle ScholarCross RefCross Ref
  3. 3 HOPCRAFT, J.E., A~D ULLMAN, J.D. Set merging algorithms. SIAM J. Comput. 2 (1973).Google ScholarGoogle Scholar
  4. 4 K~VTH, D.E. The Art of Computer Programming, Vol. 1: Fundamental Algorithms. Addison- Wesley, Reading, Mass., 1973.Google ScholarGoogle Scholar
  5. 5 TAP, JAN, R.E. Efficiency of a good but not linear set merging algorithm. J. ACM 22, 2 (April, 1975), 215-225. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6 WEiZENBAVM, J. Symmetric list processor. Commun. ACM 6, 9 (Sept. 1963), 524-544. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Managing Reentrant Structures Using Reference Counts

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM Transactions on Programming Languages and Systems
      ACM Transactions on Programming Languages and Systems  Volume 2, Issue 3
      July 1980
      195 pages
      ISSN:0164-0925
      EISSN:1558-4593
      DOI:10.1145/357103
      Issue’s Table of Contents

      Copyright © 1980 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 July 1980
      Published in toplas Volume 2, Issue 3

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader