(index ("setup-low-level-stuff" 0) ("gc-happened?" 384) ("do-the-dance" 550))
(def (sig (procedure "(setup-low-level-stuff MINSIZE MAXSIZE)" (id setup-low-level-stuff))) (p "Sets up a " (i "GC hook") " that records whether a major garbage collection has been performed. Any previously installed hooks are retained. " (tt "MINSIZE") " and " (tt "MAXSIZE") " specify the minimum and maximum size of objects (in elements) that should be extracted from the heap."))
(def (sig (procedure "(gc-happened?)" (id gc-happened?))) (p "Returns true if a major GC was triggered after the last call to " (tt "do-the-dance") " (see below)."))
(def (sig (procedure "(do-the-dance COUNT PROTOS)" (id do-the-dance))) (p "Performs another major garbage collection and collects at most " (tt "COUNT") " non-immediate objects still live on the heap after the collection. " (tt "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 " (tt "PROTOS") " specify record objects that should be matched.") (p "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.") (p "The object vector holds the actual objects filtered from the heap. The link table contains sub-vectors of the form " (tt "#(LINKCOUNT LINKINDEX1 ...)") " where " (tt "LINKCOUNT") " gives the number of links between the object at the same index in the object vector and " (tt "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 " (tt "#f") " and has the same size as the filtered object.") (p "Note that this procedure does very little error checking."))
