POV-Ray : Newsgroups : povray.off-topic : A tale of two cities : Re: A tale of two cities Server Time
29 Jul 2024 14:21:55 EDT (-0400)
  Re: A tale of two cities  
From: Darren New
Date: 15 Mar 2012 19:20:43
Message: <4f62794b@news.povray.org>
On 3/15/2012 7:42, Warp wrote:
>    A concurrent compacting GC sounds to me like a very hard problem.

Yes.

> 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.

You wind up dividing the heap into multiple zones, based on whether you've 
scanned the object, compacted the object, or haven't looked at the object. 
If someone tries to write to an object you've scanned and assign it a 
pointer to an object you haven't scanned, then at that point you move the 
object from the unscanned to the scanned region.

If you set it up so writes cause page faults in that situation, you can get 
really good performance by just GCing one page worth of objects each time 
you hit that fault, which is the paper Andrew refers to.

-- 
Darren New, San Diego CA, USA (PST)
   People tell me I am the counter-example.


Post a reply to this message

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