Garbarge collection for Prolog based on WAM
- 1 June 1988
- journal article
- Published by Association for Computing Machinery (ACM) in Communications of the ACM
- Vol. 31 (6), 719-741
- https://doi.org/10.1145/62959.62968
Abstract
The Warren abstract machine (WAM) has become a generally accepted standard Prolog implementation technique. Garbage collection is an important aspect in the implementation of any Prolog system. A synopsis of the WAM is presented and then marking and compaction algorithms are shown that take advantage of WAM's unique use of the data areas. Marking and compaction are performed on both the heap and the trail; both use pointer reversal techniques, which obviate the need for extra stack space. However, two bits for every pointer on the heap are reserved for the garbage collection algorithm. The algorithm can work on segments of the heap, which may lead to a significant reduction of the total garbage collection time. The time of the algorithms are linear in the size of the areas.Keywords
This publication has 3 references indexed in Scilit:
- A real-time garbage collector based on the lifetimes of objectsCommunications of the ACM, 1983
- A time- and space-efficient garbage compaction algorithmCommunications of the ACM, 1978
- Marking algorithmsBIT Numerical Mathematics, 1972