POV-Ray : Newsgroups : povray.off-topic : Curious C / C++ defined behavior question : Re: Curious C / C++ defined behavior question Server Time
30 Jul 2024 00:22:05 EDT (-0400)
  Re: Curious C / C++ defined behavior question  
From: Darren New
Date: 30 Jun 2011 00:25:48
Message: <4e0bfacc$1@news.povray.org>
On 6/29/2011 20:40, clipka wrote:
> ... which does not prevent you from failure due to hitting the memory limit.

Of course.  I wasn't trying to imply there might not be a recursion limit. 
Of course anything that allocates memory might fail, and a function call 
that's going to allocate a large chunk of memory for a parameter could fail.

> In that case it either can't have placed all local variables at fixed
> addresses, or must have placed a hard limit on recursions.

I honestly don't remember. I remember I had to switch to a C compiler 
because I didn't have enough memory for all local variables at once.

> Either way, there /always/ is a limit on recursion depth, and AFAIK
> determining at compile-time whether an arbitrary program ever hits that
> depth is as hard as solving the halting problem.

Right.  Sorry if what I wrote implied I thought that wasn't the case.

-- 
Darren New, San Diego CA, USA (PST)
   "Coding without comments is like
    driving without turn signals."


Post a reply to this message

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