Each entry of the binding-stack consists of two boxed (32-bit) words. Pushed first is a pointer to the symbol being bound. Pushed second is the symbol’s old value (any boxed item) that is to be restored when the binding stack is popped.
New objects are allocated from the lowest unused addresses within the specified space. Each allocation call specifies how many words are wanted, and a Free-Storage pointer is incremented by that amount. There is one of these Free-Storage pointers for each space, and it points to the lowest free address in the space. There is also a Clean-Space pointer associated with each space that is used during garbage collection. These pointers are stored in a table which is indexed by the type and space code. The address of the Free-Storage pointer for a given space is
(+ alloc-table-base (lsh type 5) (lsh space 3)).
The address of the Clean-Space pointer is
(+ alloc-table-base (lsh type 5) (lsh space 3) 4).
Common Lisp on the IBM RT PC uses a stop-and-copy garbage collector to reclaim storage. The Collect-Garbage miscop performs a full GC. The algorithm used is a degenerate form of Baker’s incremental garbage collection scheme. When the Collect-Garbage miscop is executed, the following happens:
A Lisp-level GC function returns the oldspace pages to Mach.