This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Gen GC?
Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
> mlivshin@bigfoot.com writes:
>
> > can you check where (code-wise) does Guile touch a lot of pages?
>
> I'll have to think about this; I'm not sure how I can trace this.
<code>
#include <libguile/gc.h>
static void *
greet_sweep (void *dummy1, void *dummy2, void *dummy3)
{
fprintf(stderr, "entering sweep\n");
}
static void *
wave_sweep_goodbye (void *dummy1, void *dummy2, void *dummy3)
{
fprintf(stderr, "leaving sweep\n");
}
scm_c_hook_add (&scm_before_mark_c_hook, greet_sweep, 0, 0);
scm_c_hook_add (&scm_before_sweep_c_hook, wave_sweep_goodbye, 0, 0);
</code>
you'll need a recent CVS Guile for this, I'm afraid.
> What exactly is lazy sweeping?
it's when the GC doesn't doesn't sweep all the heap at once at the end
of the collection, but rather does it on demand. this can help avoid
touching a lot of pages unnessesarily.
--
All ITS machines now have hardware for a new machine instruction --
BAH
Branch And Hang.
Please update your programs.