[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: GC error ?

Yukihiro Matsumoto

2/21/2008 8:51:00 PM

Hi,

In message "Re: GC error ?"
on Fri, 22 Feb 2008 05:17:03 +0900, "Rick DeNatale" <rick.denatale@gmail.com> writes:

|Yes, and it also suffers from two facts that make it perform
|sub-optimally on a virtual memory system (i.e. just about any system
|these days)
|
|1) It fails to compact the live objects
|2) It pretty much is guaranteed to visit every memory page at least
|twice per GC cycle.

Indeed, we need two visits (one write to mark live objects/one read to
sweep dead objects) per GC. But using bitmap marking technique[1],
objects visit can be reduced to one.

[1] http://izumi.plan99.net/blog/index.php/2008/01/14/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friend...

There's an algorithm named "mostly copying GC" to address the former
"fact", but it is too complex for us to implement.

matz.

1 Answer

Daniel Berger

2/21/2008 9:18:00 PM

0



On Feb 21, 1:51=A0pm, Yukihiro Matsumoto <m...@ruby-lang.org> wrote:
> Hi,
>
> In message "Re: GC error ?"
> =A0 =A0 on Fri, 22 Feb 2008 05:17:03 +0900, "Rick DeNatale" <rick.denat...=
@gmail.com> writes:
>
> |Yes, and it also suffers from two facts that make it perform
> |sub-optimally on a virtual memory system (i.e. just about any system
> |these days)
> |
> |1) It fails to compact the live objects
> |2) It pretty much is guaranteed to visit every memory page at least
> |twice per GC cycle.
>
> Indeed, we need two visits (one write to mark live objects/one read to
> sweep dead objects) per GC. =A0But using bitmap marking technique[1],
> objects visit can be reduced to one.
>
> [1]http://izumi.plan99.net/blog/index.php/2008/01/14/making-ruby%...