chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] 'Stack overflow' on NetBSD/sparc64


From: Category 5
Subject: Re: [Chicken-users] 'Stack overflow' on NetBSD/sparc64
Date: Thu, 31 Jul 2003 11:24:37 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3

felix writes:

> Please try the following: change the definition of C_STACK_RESERVE in
> chicken.h to 4096, instead of 128000 and re-make.

Many thanks!  This certainly seems to fix the problem.  The build
finishes cleanly now with no sign of stack overflow errors.

% cat e.ss
(define seq:e (lambda (n) (if (= (modulo n 3) 2) (- n (quotient n 3)) 1)))

(define continued-fraction
  (lambda (n d k)
    (let lp ((k k)
             (accum (d k)))
      (if (= k 1)
          (/ (n 1) accum)
          (lp (- k 1) (+ (d (- k 1)) (/ (n k) accum)))))))

(time (+ 2 (continued-fraction (lambda (n) 1) seq:e 1000000)))

% csi < e.ss ; csc e.ss ; ./e
; This is the CHICKEN interpreter.
; Version 1, Build 14 - netbsd-gnu-ultrasparc
; (c)2000-2003 Felix L. Winkelmann
  33.183 seconds elapsed
   3.849 seconds in GC
  107065 mutations
     241 minor GCs
     171 major GCs
2.718281828459046
  14.801 seconds elapsed
   0.706 seconds in GC
       0 mutations
    5232 minor GCs
       7 major GCs
% 

-- 





reply via email to

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