POV-Ray : Newsgroups : povray.advanced-users : the POV-ray SDL--similar to Java and/or Python? : Re: the POV-ray SDL--similar to Java and/or Python? Server Time
6 Oct 2024 20:19:16 EDT (-0400)
  Re: the POV-ray SDL--similar to Java and/or Python?  
From: Warp
Date: 14 Sep 2006 13:17:17
Message: <45098e9d@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> >   Oh, you have discovered a method to completely avoid memory
> > fragmentation? :-o Is it efficient?

> Yes, and yes.

  That would mean that the memory allocation engine knows ahead of time
the order in which objects will be "forgotten" (ie. nothing points to them
anymore so they can be freed) so that it can group them in contiguous
memory. Of course this is impossible (not even by analyzing the program
because the order in which objects are "forgotten" may depend on things
like user input).

  The only other alternative is that it performs memory defragmentation
before freeing the objects. But that doesn't sound any faster than
freeing the objects directly. (Memory defragmentation is something
useful per se, but doesn't sound like a fast way of freeing objects
in highly fragmented memory before the defragmentation has happened.)

  Oh, of course there's a third possibility: It doesn't free objects if
freeing them would cause fragmentation. But then they would consume
memory even though they are not used. Doesn't sound reasonable if that
memory would be needed for something else.

-- 
                                                          - Warp


Post a reply to this message

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