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

Re: Memory usage




In article <41656@sophia.inria.fr>, brad@cs.adelaide.edu.au (Bradley Alexander) writes:
=> 
=> Hello,
=>        I'm currently using centaur to type check and interpret a
=> language I have defined using metal and typol. I find that for
=> medium size programs the execution aborts with the message:
=> 
=>    MU-Prolog: out of memory
=> 
=>    Execution aborted

Hi Brad, 

First, i'll start off by saying i am not a typol expert and i hope 
someone else will be able to answer your question more fully.  However,
"Mu-Prolog out of memory" is a problem with the typol execution that 
uses up all the available place in prolog.

=> Is there any way to allocate more memory to the system? I tried 
=> running centaur with the parameter 1000 and it didn't seem to help
=> a great deal (it used a lot more memory but aborted at about the
=> same stage of the program).

The parameter that one passes to centaur is the "cons" size in lelisp
so allocating more space in lisp can't be the answer to your problem.
When you say above that *it* uses a lot more memory, i assume you are
talking about the centaur process size.  This is true, but unfortunately
there is no sharing being the lisp and prolog memory so this approach 
doesn't gain you anything.

The size of Mu-Prolog memory can only be given at the time the Centaur
(lelisp) core is built.  The default value is 600000 words.   How to change
(augment or diminish) this is explained in the Centaur documentation (Vol. 0:
Istallation & Changes, on page 7 of "Installing and Customizing Centaur").  In
fact, the *make* variable of interest is GSTKLEN (global stack length).  

Clearly, you can remake the core you run to have more space allocated in 
Mu-Prolog, this will at least temporarily get you back to work.  The questions
i can't answer are whether there is something in your Typol specification that
makes you more likely to have this problem, whether there is a reasonable way
to compute what the best value for GSTKLEN should be, etc.  i'll leave those 
for the experts (any takers ;-)

	cheers
	janet bertot