[CM] Protecting Scheme data structures from GC?

Iain Duncan iainduncanlists at gmail.com
Sun Apr 30 08:53:35 PDT 2023


Thanks Bill. I guess I was hoping reducing how much it had to scan over
would make a scan faster, but am not correct. Do you have any suggestions
for what one can do to cut GC times down on a code level when there is a
lot of code going?

thanks
iain


On Sat, Apr 29, 2023 at 10:14 AM <bil at ccrma.stanford.edu> wrote:

> To keep an environment from the being garbage collected,
> assign it to a global variable -- as long as the variable
> holds the environment, it will be safe.  This won't speed
> up the GC.  It's possible to make s7 strings that are not
> seen at all by the GC (make_permament_string), but it's much
> trickier for an environment -- you'd have to be sure that
> every cell of every variable in the environment was
> permanent; otherwise the cell might have no one else
> referring to it, and the GC would free it.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20230430/ebf1ee61/attachment.html>


More information about the Cmdist mailing list