POV-Ray : Newsgroups : povray.advanced-users : Computer locked up : Re: Computer locked up Server Time
14 May 2024 10:20:31 EDT (-0400)
  Re: Computer locked up  
From: clipka
Date: 13 Aug 2015 06:29:11
Message: <55cc7177$1@news.povray.org>
Am 13.08.2015 um 09:25 schrieb Mike Horvath:
> On 8/13/2015 2:42 AM, scott wrote:
>> So it should probably give an option of a maximum amount of memory to
>> ask the OS for? I have similar issues with simulation tools on my
>> windows box, but they (the apps) all give an option to limit the total
>> amount of RAM used. If you set it just under the amount of physical RAM
>> then at least you get an error before things go very screwy.
>>
>
> It might be nice to be able to set an upper limit on how much memory
> POV-Ray is allowed to use and then fail gracefully when this limit is
> reached.

If you are happy with a fixed limit of 3GB, a simple solution would be 
to use the 32-bit version of POV-Ray.


As for setting an arbitrary limit, it should be no surprise that this is 
something that's not portable across operating systems.

 From what I'm finding on the 'net, on Windows machines "Job Objects" 
seems to be a viable mechanism to achieve this. The idea would be to 
tell Windows that it should simply pretend to POV-Ray that it is out of 
memory if POV-Ray's memory requests exceed a given total size; POV-Ray's 
failure mode would be the same as with the 32-bit version exceeding the 
3GB limit. Whether this causes it to "fail gracefully" depends on 
whether every nook and cranny of POV-Ray deals gracefully with an 
out-of-memory condition; I currently can't vouch for that.

Alternatively, the front-end could continuously monitor POV-Ray's memory 
consumption (it already does that for the status bar display anyway), 
and if it exceeds the set limit it could send an abort request to the 
back-end. This would make sure POV-Ray doesn't crash, and instead just 
terminate the render; however, this mechanism may fail if memory 
consumption increases too fast.


On Unix machines, the problem isn't that much of an issue, as operating 
systems designed for multi-user operation are typically quite robust 
against all sorts of ways an application could possibly run amok.


Post a reply to this message

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