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

re: growing the control stack

To: SLUG distribution

Thanks to Judy Anderson, David Vinayak Wallace, and Mabry Tyson for
suggesting several solutions to the problem of how to grow the stack
before it overflows. The solution which I eventually chose was to run the
program in a new stack group. For those who might be interested, here is
an excerpt of the code:

;;; the original program
(defun my-program (arg)

;;; a resource provides a stack group with a large control stack
(defresource my-resource ()
  :constructor (make-stack-group "large" :regular-pdl-size 40000))

;;; the new program using a new stack group
(defun my-new-program (arg)
  (using-resource (sg my-resource)
    (stack-group-preset sg #'my-program arg)
    (funcall sg)))

Koenraad De Smedt
Cognitive Science Program
University of Nijmegen (the Netherlands)