Abstract

This paper presents a new storage representation for cons cells (and all other LISP heap data structures) which allows more time efficient LISP with real-time garbage collection on stock hardware. “Stock hardware” refers to common modern architectures for Von Neumann uni-processors (e.g. MC68000, IBM370, VAX, NS32032, etc.). Previous real-time garbage collection schemes have either explicitly required specially tailored hardware in order to avoid multiple order of magnitude slowdowns, or have been merely extremely unattractive for implementation on stock hardware due to the high overhead assumed by all basic LISP primitives in checking the garbage collection status of pointers handed to them as arguments. We first show that copying compacting real-time garbage collection algorithms do not always need to protect user programs from seeing uncopied data, so long as a slightly more complicated collection termination condition is used. This opens the way to adding an indirection pointer to all LISP heap objects making it unnecessary to check the garbage collection status of pointers, and so the overhead costs for most primitives reduce to the addition of a single instruction. Impure primitives, i.e. those which write into existing structures (e.g. RPLACD), have their overhead reduced by a factor of almost 2. Code density is correspondingly decreased. The cost of this scheme is increased storage size for all LISP heap objects one extra pointer per object, although for some objects (e.g. floating point numbers) this expense is already necessary in many other non real-time garbage collection algorithms.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call