[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

garbage collection

From: Mike Maxwell
Subject: garbage collection
Date: Tue, 17 Feb 2004 09:42:11 -0500

I need to port an app from "Visual Prolog" (I know, that's why I'm porting
it).  One of the guidelines is that the source code needs to remain hidden,
hence I want a true compiler.  (I'm assuming that a "byte code" compiler
will allow you to dump the source code via the debugger.)

Gnu-Prolog seems a logical (pun intended) choice.  However, it apparently
doesn't have a garbage collector (yet).  It's unclear to me how much of a
problem this is.

I could probably find out whether it's a problem by finishing the port and
then trying out the application.  But I'd rather not potentially waste time
doing that, if it's not going to work.  So--

(1) Am I correct that Gnu Prolog doesn't have gc?

(2) How much of a problem is this in practice?  What kind of programming
constructs lead to running out of memory?

(3) There's a snippet of code on page 85 of O'Keefe's "The Craft of Prolog"
which claims to be a work-around for systems without gc.  But I'm unfamiliar
with how Prologs work internally, and it's unclear to me whether this will
necessarily work with GnuProlog.  (I assume it will, O'Keefe certainly knows
what he's talking about, and GC implements the standard WAM, but...)  The
app I'm porting is fairly shallow--it's a morphological parser, so it's
doing a shallow search repeatedly.  I very much doubt it would run out of
memory parsing a single word.  So it looks like it would be easy to wrap the
call to parse a single word in this, and I would be home free, apart from
the rather trivial code to read in words from the input.  Does this make

    Mike Maxwell

reply via email to

[Prev in Thread] Current Thread [Next in Thread]