[Top][All Lists]

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

stack size info

From: A Soare
Subject: stack size info
Date: Tue, 20 Mar 2007 14:22:14 +0100 (CET)

16.7 Byte-Code Function Objects

     The maximum stack size this function needs.


(defun p (n)
  (if (> n 1) (+ n (p (1- n)))

(byte-compile 'p)
(symbol-function 'p)

  [n 1 p]
  3            <=<= here is the stack size.

But I believe that a recursive function has the stack greater, 3*n, not 3. For 
every recursion I believe that the stack size get greater with 3, so the stack 
is dependent of n. Is it true?

Is this a little error of explanation in INFO file?

reply via email to

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