- do-the-dance COUNT PROTOSprocedure
Performs another major garbage collection and collects at most COUNT non-immediate objects still live on the heap after the collection. PROTOS should be a vector of prototype objects - live objects in the heap that are of identical type are collected and returned. Structure objects ("records") in PROTOS specify record objects that should be matched.
Returns 3 values: the "object vector", the "link table" and a count of how many objects are stored in the object vector and link table, respectively.
The object vector holds the actual objects filtered from the heap. The link table contains sub-vectors of the form #(LINKCOUNT LINKINDEX1 ...) where LINKCOUNT gives the number of links between the object at the same index in the object vector and LINKINDEX1 ... gives the index of objects that where filtered and who are references by that object. The sub-vector may hold additional elements of value #f and has the same size as the filtered object.
Note that this procedure does very little error checking.