POV-Ray : Newsgroups : povray.windows : Memory Reporting : Re: Memory Reporting Server Time
28 Jul 2024 08:28:36 EDT (-0400)
  Re: Memory Reporting  
From: Ken
Date: 26 Jul 1999 07:48:31
Message: <379C4A7D.4BD1B31C@pacbell.net>
Nieminen Mika wrote:
> 
> 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.


What a screwy way of doing business...

-- 
Ken Tyler
  
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm


Post a reply to this message

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