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 22:13:23 EDT (-0400)
  Re: the POV-ray SDL--similar to Java and/or Python?  
From: Warp
Date: 14 Sep 2006 06:08:54
Message: <45092a35@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> >>You can allocate 100,000 individual objects and 
> >>free them all with one instruction.
> > 
> >   Assuming no memory fragmentation, of course.

> How do you think allocation in a garbage collected system works? Of 
> *course* there's no fragmentation.

  Oh, you have discovered a method to completely avoid memory
fragmentation? :-o Is it efficient?
  I think that the world would be very interested in hearing that
method.

> Um, why would it have to "put it somewhere"? The problem isn't "freeing 
> the object". The problem is running through all the pointers in the 
> object whose reference went to zero and marking those as freed also.

  Instead your non-fragmenting memory allocation engine knows by magic
all the objects which are not used anymore and those which are,
with no reference counts, with no going through allocated objects
to see if anything points to them, with nothing?

> And you still haven't solved the major problem, which is that reference 
> counting DOES NOT WORK.  Reference counting, even with sufficiently 
> large counters, does not free all the garbage, even if you do it 
> inefficiently.

  Ok, it doesn't work and it's slow.

> >   Btw, how does the GC engine know that the object is not used anymore?

> There are a number of ways, from simplistic to convoluted. Generally, GC 
> engines assume they can find the live pointers.

  Can't you give me even some idea?

-- 
                                                          - Warp


Post a reply to this message

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