>It could also indicate that Director is freeing memory
>internally to reuse but not necessarily releasing that block of memory back
>to the OS directly.

Sounds right on the nose, Mark--Director is hanging on to a block of memory 
in between garbage collections. Over time, RAM can become fragmented much 
like a hard drive.

It goes something like this: When you start, Director estimates the amount 
of RAM you will need, allocates it, then loads assets into that block. You 
get "holes" in your RAM--memory that Director is still holding onto, so the 
system doesn't see it as free. From Director's perspective, though, it is 
still free. That accounts for the difference between what the system 
reports and what Director reports (but not for the inaccuracy of freeBytes).

As you load and unload assets of different sizes, Director tries to find a 
contiguous block of RAM to hold it. If it can't, it will check to see if it 
can consolidate these RAM "holes" into a block big enough to hold the new 
asset(s). If so, it will reorganize RAM on the fly--that accounts for some 
of the random delays you see in an asset-heavy program.

Occasionally Director will recognize that it has more RAM than it needs, so 
it gives it back to the system. Or, conversely, it needs extra RAM, so it 
allocates another block.


Cordially,

Kerry Thompson


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to