POV-Ray : Newsgroups : povray.beta-test : max_trace_level problem : Re: max_trace_level problem Server Time
30 Jul 2024 12:28:23 EDT (-0400)
  Re: max_trace_level problem  
From: Warp
Date: 11 Nov 2001 06:20:49
Message: <3bee5f11@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
: Well, I hope you can at least assign a stack limit (or general memory) limit
: to processes in any system that supports unlimited stack sizes.  If not, you
: would have a problem, and thus all Unix versions I know support such a
: limit.

: Ask yourself the question what happens if this space has been consumed by
: the stack?  You get a signal, one that will force you to terminate POV-Ray
: (because it cannot cope with the problem in another way).

  Of course there's a limit: Physical memory.
  However, I think that the trace level has to go to millions before you are
getting even close to filling the stack with a regular-sized scene.
  Of course the scene itself could eat up most of the memory thus leaving
less space for the stack, but in this case a povray's internal limit will
not help. The memory could be so filled that even a recursion level of 10
could fill the stack. Of course this is an extremely rare case, but
theoretically possible. What I'm trying to say here is that imposing an
artificial limit to the recursion level does not help at all in unix. If the
memory fills up, it can run out of stack space, regardless of any internal
limit.

  As for the Windows version: I still don't understand why a bigger stack
could not be linked to the program. Most compilers have an option to specify
the stack size the program will use; this stack size is usually very small
(eg. 8 or 16 kilobytes); just increase it and there you are: You can have
tens of thousands of recursions in winpov.

  If you are going to limit the max recursion limit, then at least put
somewhere an easily modifiable flag that can be switched to get rid of
this limitation. This way people compiling the unix version can get an
unlimited version.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.