POV-Ray : Newsgroups : povray.off-topic : A tale of two cities : Re: A tale of two cities Server Time
29 Jul 2024 14:20:12 EDT (-0400)
  Re: A tale of two cities  
From: Invisible
Date: 15 Mar 2012 11:25:19
Message: <4f6209df$1@news.povray.org>
On 15/03/2012 02:42 PM, Warp wrote:

>    A concurrent compacting GC sounds to me like a very hard problem.

Everybody seems to think they know how it could be done... and yet, 
nobody has written the code that does it.

> If the GC moves objects around in RAM, it has to make sure that no code
> is modifying the object while the GC is moving it. How does it achieve
> that efficiently, I have no idea.

Well, Haskell currently does thinks like have a separate heap for each 
processor core. But that doesn't guarantee there are no pointers from 
one heap to another, so you still gotta be careful. What you would 
probably do is "mark" each object somehow, before you go about moving 
it. Trouble is, that adds the overhead of testing whether each object is 
marked every single time you want to access any object...

I'm sure it can be implemented somehow. The question is how complicated 
it would be, and how much overhead it would add.


Post a reply to this message

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