emacs-devel
[Top][All Lists]
Advanced

[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
===============================

STACKSIZE
     The maximum stack size this function needs.

------------------------------

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



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

#[(n)
  "..."
  [n 1 p]
  3            <=<= here is the stack size.
  "sum"]

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]