[gambit-list] Help With Memory

Marc Feeley feeley at iro.umontreal.ca
Thu Sep 25 13:15:07 EDT 2008

On 22-Sep-08, at 3:26 PM, Joel J. Adamson wrote:

> Getting the code
> ================
> The code is available for public download from svn at
> http://chondestes.bio.unc.edu/svn/models/agjones

The following code is rather odd:
(define (mem-handler exc)
   (if (or (heap-overflow-exception? exc)
           (stack-overflow-exception? exc))
       (if (noncontinuable-exception? exc) (abort exc) exc)
       (with-exception-catcher error-handler (lambda () (raise exc)))))

Why do you test for noncontinuable-exceptions?  Why do you call with- 
exception-catcher with a thunk that immediately raises an exception?   
Might as well just do (error-handler exc).
What are you trying to accomplish?  I suggest you use this instead, to  
determine if it is causing your problem:

(define (mem-handler exc)
   (display-exception exc)
   (exit 1))


More information about the Gambit-list mailing list