[Gc] How to do enable gc of prolog programs using bdw-gc
Stefan Israelsson Tampe <[email protected]>
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <CAGua6m2j1Hiv-1dCU+S2vA+23sJ9Q-DDqLu6S+9XskKQtS-t-g@mail.gmail.com> |
Hi all, I'm have just implemented a prolog engine in guile which uses bdw-gc and a gc engine. My problem is that I need to garabage collect logical variables. The main feature of these variables are that they can backtrack and hence the old variable binding is stored on a datastructure. As long as the variables are on this list I need them to be alive and not gc'd But if they are not reachable I would like to, in a controlled way get rid if the variables and compact the datastructure. The basic need is to have a function, fmark, that does just mark the object to prevent it from gc and not issue any mark functions. Also when an object is considered to be marked in the normal sense it also need to mark it as touched so that I can later verify that an object is alive (I could have marked it with fmark before). Another option is to have a secondare mark phase, in order to make sure that objects are marked the normal way before fmark is tried. Does this make sense. Do you see any other option that are sane(er)? Anyhow I'm experimenting with adding support for the first case, and it seams to be doable without too much hazzle (thank you open source). If you are interested I could inform you about the progress. Cheers Stefan _______________________________________________ bdwgc mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/bdwgc