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

Stack space

    Date: Mon 24 Mar 86 19:49:03-CST
    From:  M. V. LaPolla <CS.LAPOLLA@R20.UTEXAS.EDU>

    Does anyone know how to expand stack space, in Prolog Listener,
    before the error trap?

You want to look in sys>debugger>support.lisp, at the function and
variable called stack-grower.  In case you don't have this source,
you can do the following:

 From lisp:
(funcall dbg:stack-grower :control n)

In this example, if n is an integer, it represents the amount to grow
the stack by; if it is floating point, it represents the FACTOR by which
to multiply the size of the stack.  The :control specifies which stack
to grow.  You may also want to look into the *function*, but its usage
seems a little more obscure to me.

If you want to do this from your PROLOG program, you should do something

1.  (defun grow-my-control-stack (n)
	(funcall dbg:stack-grower :control n))

2.  In PROLOG:
	grow_ctl_stack(N) :-

The lisp function in lozenges ('s) *MUST* be capitalized.

If you need to grow the structure stack, this is another story.
You need to look in the run-time prolog code, and alter the
structure stack size there, and recompile.  There is no way
to just call a lisp or prolog form to achieve this effect.

    Also does anyone know how to reference
    packages outside of Prolog-User or User, i.e. Time:.


To call something in the time package, do the following:

call_out :-
	funcall(TIME:PRINT-DATE,45, 20, 4, 18, 4, 1985, 5).

Remember to *CAPITALIZE* the lisp function, and to use the lozenges.

Jim Dean - Symbolics Software Support.