[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic loading progress
From: |
Stefan Monnier |
Subject: |
Re: Dynamic loading progress |
Date: |
Wed, 09 Jul 2014 18:18:02 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
> It should work but I've ran into a strange problem: the doc field is
> set correctly in step a) but the field becomes either an invalid lisp
> object or garbage at step b).
[...]
> It suspect it has to do with garbage collecting since I have not done
> anything special to protect the doc field. I'm not sure how to
> proceed.
Right. You need to tell the GC to trace this new field.
Look at the mark_object function in alloc.c.
You could change its handling of PVEC_SUBR such that it calls itself
recursively on the `doc' field and then make sure the VECTOR_MARKED_P bit
gets reset to false in gc_sweep.
Or maybe force those `doc' references to be kept alive by adding
globally reachable references to them (e.g. have a global list of all
the cons cells you ever added to such a `doc' field, and then
`staticpro' that list).
Stefan
- Dynamic loading progress, Aurélien Aptel, 2014/07/02
- Re: Dynamic loading progress, Stefan Monnier, 2014/07/03
- Re: Dynamic loading progress, Aurélien Aptel, 2014/07/06
- Re: Dynamic loading progress, Stefan Monnier, 2014/07/06
- Re: Dynamic loading progress, Aurélien Aptel, 2014/07/09
- Re: Dynamic loading progress,
Stefan Monnier <=
- Re: Dynamic loading progress, Aurélien Aptel, 2014/07/10
- Re: Dynamic loading progress, Stefan Monnier, 2014/07/10
- Re: Dynamic loading progress, Aurélien Aptel, 2014/07/11
- Re: Dynamic loading progress, Stefan Monnier, 2014/07/11