unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: A Soare <alinsoar@voila.fr>
To: "Emacs   Dev  [emacs-devel]" <emacs-devel@gnu.org>
Subject: stack size info
Date: Tue, 20 Mar 2007 14:22:14 +0100 (CET)	[thread overview]
Message-ID: <5308249.137871174396934265.JavaMail.www@wwinf4205> (raw)


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	other threads:[~2007-03-20 13:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-20 13:22 A Soare [this message]
2007-03-20 16:14 ` stack size info ttn
  -- strict thread matches above, loose matches on Subject: below --
2007-03-22 15:19 A Soare
2007-03-22 18:24 ` David Kastrup
2007-03-23 15:01   ` Thien-Thi Nguyen
2007-03-23 16:00     ` Stefan Monnier
2007-03-23 15:08 A Soare
2007-03-24 13:38 ` Thien-Thi Nguyen
2007-03-26 10:42 A Soare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5308249.137871174396934265.JavaMail.www@wwinf4205 \
    --to=alinsoar@voila.fr \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).