Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: Metrics on stack usage Date: Fri, 19 Sep 2014 18:58:59 -0400 Organization: Aioe.org NNTP Server Lines: 21 Message-ID: References: <541855C0.2558D27D@bytecraft.com> <5419FFEE.27412D2C@bytecraft.com> <7x8ulhzuax.fsf@ruckus.brouhaha.com> <541ab362$0$6923$e4fe514c@dreader36.news.xs4all.nl> <2014Sep19.140810@mips.complang.tuwien.ac.at> NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:33446 On Fri, 19 Sep 2014 08:08:10 -0400, Anton Ertl wrote: > Celeros writes: >> I'm an extreme newbie here, but it sounds to me like stacks don't >> need to be very deep in order to do *most* things. > > Right. 256 stack items seems to be significantly more than enough > for the kinds of code I expect is run there. > While I've been using only 256 during development, I expected the actual size needed would be much larger. E.g., DJGPP (GCC for DOS) allocates 512KB for stack, and 32KB for interrupt stacks. So, maybe, the wrong question is being asked ... Instead of asking how deep a stack should be, maybe we should be asking if anyone has ever run out of stack space in Forth? If so, which Forth, which app, and under what conditions? Rod Pemberton