> -> (progn (mapc #'(lambda (x) (print x)
(terpri)) (gc-stats)) (values))
> [...]
Interesting. Should I assume that most of those inuse
cons are
actually representations of code?
Probably not. You may note that the %collected value for conses is
much higher than for anything else; this reflects the fact that the
interpreter (this Lisp engine is entirely interpreted) uses conses
heavily for its internal lists. By setting breakpoints in gdb, I find
that, immediately after the last gc before printing the first prompt,
there are 2328 conses in use - but doing (assq '%cons (gc-stats)) at
that prompt prints 4698, and doing it again immediately reports 25428
conses in use - but it also triggers a gc, after which gdb says there
are 2486 conses in use, so the gc probably happens after (gc-stats)
sampled the values but before the top-level read-eval-print loop
printed the result.
Those 2328 and 2486 values probably _are_ mostly representations of
code; though they do include the then-current state of the interpreter
stacks, those stacks are usually relatively small at that point, maybe
a few hundred conses I'd say (this based largely on past experience
watching output with internal debugging turned on, which dumps all the
interpreter stacks every interpreter cycle).
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B