3 ms·
> Anyone who is interested in this, should read how that is implement. Are is it implemented? my understanding was that it retains 4 copies of the entire heap
by easytiger 12y ago
> Anyone who is interested in this, should read how that is implement.
Are is it implemented? my understanding was that it retains 4 copies of the entire heap in memory and continuously switches between them, or something like that.
- nickik 12y agoThat is not at all how it works. Essentially it splits the hole heap up into pages, pages have a state empty, allocating, evacuting. There are GC threads who constantly reallocate objects from pages that have high amount of unreachable objects to new pages. In order not to have mutator threads waiting for GC threads, they use worksharing. When the mutator wants to read from a page that is evacuting then, it will move that object itself (this is where the need the read barrior). This all requires very small amount of syncronisation, there is one small checkin point that every thread has to visit, then its all concurrent again. The pauses are only relate to how long it takes everybody to checkin, not the size of the heap, or the size of the pages. This allows multible 100GB with very small pause times. I just wrote this from memory and its of course more complicated, but this might help you to think about it.
- easytiger 12y agoThanks