[webkit-dev] How does the Javascript garbage collection work?

Josh Chia (谢任中) joshchia at gmail.com
Thu Sep 11 00:13:03 PDT 2008


I did some more research.  It seems that KJS does mark-and-sweep
GC<http://www.hpl.hp.com/personal/Hans_Boehm/gc/complexity.html>,
and the marking is to mark objects that are not known to be unreachable, so
that those left unmarked can be removed at the end.  Please correct me if
I'm wrong.

On Wed, Sep 10, 2008 at 9:23 PM, Josh Chia (谢任中) <joshchia at gmail.com> wrote:

> Hi,
>
> I'm trying to debug some memory leaks and now need to understand what
> collector.{h,cpp} are doing.  Could someone point me to some documents to
> explain how the garbage collector works?  I've also run valgrind and it
> complained that CollectorBitmap::get() uses an unreferenced value.  I'm not
> sure whether this is really wrong, so I'll have to first understand how the
> garbage collector works, the alignment magic used with JSCell and whatever
> other GC magic I could probably figure out on my own but only after staring
> at the code for a long time.
>
> Josh
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080911/c0865237/attachment.html 


More information about the webkit-dev mailing list