POV-Ray : Newsgroups : povray.windows : Memory Reporting : Re: Memory Reporting Server Time
28 Jul 2024 08:17:16 EDT (-0400)
  Re: Memory Reporting  
From: Nieminen Mika
Date: 26 Jul 1999 07:43:23
Message: <379c49db@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
:  A scene I rendered this evening had 120k objects. I have 128 megs of
: physical ram memory and about 250 megs of swap space available. The
: 128 megs of ram were consumed quickly and the swap file grew to nearly
: 220 megs before it finaly finished parsing the file. When I checked the
: peak memory use after the image finished rendering however it only
: reported using 128 megs of memory. Obviously the math does not work out
: and I am wondering why there is such a descrepency between what I know
: it to have used and what the program itself reports was used.

  I'm not sure, but perhaps it's due to windows and its memory management.
Perhaps it doesn't free immediately the memory freed by the program. Or
perhaps there are memory fragmentation problems.
  Suppose this:

  m1=allocate(100);
  m2=allocate(50);
  m3=allocate(100);
  deallocate(m2);
  m4=allocate(100);

  First we allocate a total of 250 units. Let's suppose that they use
contiguous memory. Our "memory usage" and "peak memory use" variable is now
250 units.
  Then we free m2, which is 50 units and our "memory usage" variable is now
200 units.
  Then we allocate 100 units. Our "memory usage" goes to 300, which is bigger
than the old "peak memory use" so it becomes also that.
  Now the system has to allocate 100 units but there's only a 50 unit hole
so it has to allocate it from the end (ie. after the m3 allocation). So
although the memory used is 300 units, 350 units of memory is needed to hold
them.
  "Peak memory used" is now 300 units, but 350 units were needed to achieve
the operation.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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