POV-Ray : Newsgroups : povray.general : An observation of concern : Re: An observation of concern Server Time
8 Aug 2024 20:29:01 EDT (-0400)
  Re: An observation of concern  
From: Duncan Gray
Date: 15 Oct 2000 09:55:56
Message: <39e9b76c@news.povray.org>
John VanSickle <van### [at] erolscom> wrote in message
news:39E71F31.34D2551F@erols.com...
> It seems to me that POV-Ray (I'm using the Win95 version) for some
> reason doesn't release everything between frames, but does release
> everything when all frames are done.
>
> Can anyone else confirm this observation, and if so, has it caused any
> genuine problems?

John:

I had a play to try to re-create the problem you have experienced - I run
under Windows NT, which has a couple of performance monitoring tools which
lets you examine a programs memory usage somewhat more accurately that Win
9x, I hoped that I might be able to let you know if it was POV-Ray allocated
memory, or memory allocated by Windows on behalf of POV-Ray (i.e. file
buffers, etc) which was growing. Alas I was unable to re-create symptoms you
describe, trying all the scenes I currently have, for the first couple of
frames, POV-Ray does not seem to free up 100% of the memory it had, but by
frame 5, the memory usage is consistently dropping to the same base level
between frames.

As I am running the same code (I assume we are talking POV-Ray Version
3.1g.watcom.win32) this must mean that your 'memory leak' is occurring in
one of the DLL's, or in Windows itself - i.e. the bits that are different in
Win NT. The fact that the memory returns when POV-Ray stops would make me
think that it is Windows itself: Windows performs it's house-keeping and
memory management as a background task, as POV-Ray is CPU intensive, Windows
may be delaying it's garbage collection until it needs to.

A possible way of confirming this might be to watch your memory usage until
it appears that two or three meg has gone adrift, then rather than stopping
POV-Ray, pause it, and minimise it. Wait for the HDD activity to die down,
then bring it back up again. Unpause it and check your memory usage - if I
am correct, the memory will have come back.

If this is the case, then I have two suggestions:
1. Ignore it - if anything, this 'problem' is probably making your machine
run slightly faster than if Windows were to clean up as it goes. When you
run out of physical memory, or try to run another application, Windows will
housekeep existing unallocated memory before resorting to swap-file usage.
2. Run a post-frame command to execute a program which will pause for two or
three seconds before exiting and allowing POV-Ray to continue. N.B. This
pause must be an event triggered pause, not a loop (which would hang up the
CPU as much as POV-Ray does). Hopefully Windows will seize this opportunity
to perform it's garbage collection.

Hope this helps.

Duncan.

N.B. Despite being a programmer myself, I must admit this is largely guess
work.


Post a reply to this message

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