Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!tcdcs!swift.cs.tcd.ie!brady From: brady@swift.cs.tcd.ie Newsgroups: comp.lang.prolog Subject: Garbage collecting names in Prolog Message-ID: <1991Apr5.143158.7857@swift.cs.tcd.ie> Date: 5 Apr 91 14:31:58 GMT Organization: Computer Science Department, Trinity College Dublin Lines: 24 Here is a question about garbage collection. It's easy enough to understand how heap & stack components can be garbage collected - anything that can't be reached by a marking process from the current context is garbage. Likewise, it's easy to figure out what retracted code can't be accessed, and so it removable. However, when it comes to names or functors, what do you implementers do? Do you (a) not bother gc-ing the names store? (b) remove all names that are not accessible from the current program? (c) something else... The problem with (a) is that the name space might just get too big. With (b), it seems that the operation of the standard bip 'current_functor' may be affected - it will mean 'a functor that is referred to by the current program or process' rather than 'a functor that was once defined'. (c), well the problem here is that I can't think of an alternative. Any suggestions? Mike Brady brady@cs.tcd.ie