POV-Ray : Newsgroups : povray.general : recursively defined objects and memory : Re: recursively defined objects and memory Server Time
29 Jul 2024 08:17:08 EDT (-0400)
  Re: recursively defined objects and memory  
From: Ger
Date: 20 Aug 2013 12:30:21
Message: <5213999d$1@news.povray.org>
On 08/20/2013 10:18 AM, clipka wrote:
>
> I was able to track down the issue to a bug in the #for loop, which
> causes the loop to terminate one iteration too early if the end value is
> large (1048576 or higher on my Windows 7 x64 Intel i7 machine; I'm a bit
> surprised you get a lower limit; I'd be interested to know what OS and
> harware you are using).
>

Sounds about right. I tried it with 1M nodes which worked fine and with 
1.25M nodes which failed. The initial value I gave was just a 
guess-estimate because I started with 1.5M which failed and then halved 
it to 750K which worked.

My OS is OpenSuse 12.3, latest updates on an AMD 8-core with 16GB mem

> As a workaround, use a #while loop with manual counter increment
> instead. It requires a few more tokens per loop, but works with
> significantly higher numbers.

I'll give it a try even though "a few tokens more" is not what you want 
in a loop that runs billions of times.

>
> I've already come up with a fix, but I'm not sure whether it will make
> its way into the 3.7.0 release proper.
>

It better, or I want my money back :)
-- 
Cheers
Ger


Post a reply to this message

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