%************************************************************************ %* * \section[SMcompact]{Code labels for single-space compacting collectors} %* * %************************************************************************ Multi-slurp protection: \begin{code} #ifndef SMCOMPACT_H #define SMCOMPACT_H \end{code} First, some potentially non-portable macros for marking locations. During compacting, we use the info pointer field of a closure to maintain a list of locations that point to the closure. The actual info pointer is saved at the end of the list. When we traverse this list, we need to be able to distinguish the info pointer from an arbitrary location (possibly in the heap, but possibly elsewhere). So, we set a bit on the locations as we add them to the list. This has to be a bit that is always going to be clear on an info pointer. Since info tables are typically word-aligned, we hope that the 0 bit will suffice for most implementations. \begin{code} #define CLEAR_PTR_BIT (0) #define MARKED_LOCATION_MASK (1L<