POV-Ray : Newsgroups : povray.beta-test : Internal limit exceeded in FixedSimpleVector : Re: Internal limit exceeded in FixedSimpleVector Server Time
26 Apr 2024 23:38:34 EDT (-0400)
  Re: Internal limit exceeded in FixedSimpleVector  
From: Chris Cason
Date: 3 Jan 2011 20:00:43
Message: <4d22713b@news.povray.org>
On 4/01/2011 11:30, RM wrote:
> Is there any limit to the size of the stack?

That's platform-specific. Some operating systems/run-time libraries employ
stack guard pages that allow automatic expansion of the stack, others have
fixed sizes per thread.

> How much memory does an instance of FixedSimpleVector consume?

Roughly, the number of elements times the size of the type of element it
contains, per instance, per thread.

For example, the LightSourceEntry structure requires 24 bytes on a 64-bit
platform, so your example of 1024 would give a stack usage of about 24k per
instance for that vector. The LitInterval struct uses 40 bytes per entry.
The Media struct is about 132 bytes.

The reason we don't use a single definition for all the sizes is that there
is no requirement that they all be the same.

> I have a scene that has over 2700 lights and I wanted to make sure that changing
> the code to handle it would not break anything.

I can't guarantee it won't, but if it does I suspect you'll find out fairly
quickly. Please feel free to report back your findings and any info you
discover about memory usage and performance.

-- Chris


Post a reply to this message

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