* Re: Latent bugs?
[not found] ` <m3isxeousz.fsf@lumo.pacujo.net>
@ 2002-12-28 18:46 ` Lynn Winebarger
2002-12-28 19:06 ` Neil Jerram
[not found] ` <87k7huaqy6.fsf@zagadka.ping.de>
1 sibling, 1 reply; 5+ messages in thread
From: Lynn Winebarger @ 2002-12-28 18:46 UTC (permalink / raw)
Cc: guile-devel
Redirected to guile-devel from bug-guile because this list gets read
more often.
On Saturday 28 December 2002 13:35, Marko Rauhamaa wrote:
> Lynn Winebarger <owinebar@free-expression.org>:
>
> > On Saturday 28 December 2002 03:49, Marko Rauhamaa wrote:
> > >
> > > return scm_list_2(scm_cons(scm_long2num(old_timer.it_interval.tv_sec),
> > > scm_long2num(old_timer.it_interval.tv_usec)),
> > > scm_cons(scm_long2num(old_timer.it_value.tv_sec),
> > > scm_long2num(old_timer.it_value.tv_usec)));
> > >
> > > If I understand it correctly, this statement contains several
> > > allocations, each of which can potentially trigger garbage collection
> > > and delete any of the intermediate results.
> >
> > The code above, though it is not explicit, will store the
> > intermediate return values (references) on the stack, where the
> > garbage collector will see them (and thus not free the newly created
> > object). It's just how the traditional model of a C machine works.
>
> I took a glance at gc_os_dep.c and I was surprised. It appears the GC
> actually sweeps through all data segments, the stack segment and CPU
> registers and heuristically locates pointers into the heap. I've used
> that technique myself before, but I wouldn't have thought that was an
> effective way of implementing a Lisp machine.
>
> The Guile manual doesn't state that basically all writable memory of a
> process participates in GC:
>
> http://www.gnu.org/software/guile/docs/guile-ref/Memory-Management.html#Memory%20Management
Guile's GC got an overhaul earlier this year. I don't know how
well the documentation reflects that.
Anybody?
Lynn
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Latent bugs?
2002-12-28 18:46 ` Latent bugs? Lynn Winebarger
@ 2002-12-28 19:06 ` Neil Jerram
2002-12-29 14:34 ` Han-Wen Nienhuys
0 siblings, 1 reply; 5+ messages in thread
From: Neil Jerram @ 2002-12-28 19:06 UTC (permalink / raw)
Cc: guile-devel
>>>>> "Lynn" == Lynn Winebarger <owinebar@free-expression.org> writes:
Lynn> On Saturday 28 December 2002 13:35, Marko Rauhamaa wrote:
>>
>> I took a glance at gc_os_dep.c and I was surprised. It appears the GC
>> actually sweeps through all data segments, the stack segment and CPU
>> registers and heuristically locates pointers into the heap. I've used
>> that technique myself before, but I wouldn't have thought that was an
>> effective way of implementing a Lisp machine.
>>
>> The Guile manual doesn't state that basically all writable memory of a
>> process participates in GC:
>>
>> http://www.gnu.org/software/guile/docs/guile-ref/Memory-Management.html#Memory%20Management
Lynn> Guile's GC got an overhaul earlier this year. I don't know how
Lynn> well the documentation reflects that.
Lynn> Anybody?
Barring a more major overhaul than I'm aware of, it is not the case
that all writable memory participates in GC. Just the stack, heap
segments (of SCM cells) allocated by Guile, and any specially
registered roots.
gc_os_dep.c (which comes from the Boehm GC) is only there because it
includes code for finding the base of the stack on lots of OS's.
Other things in gc_os_dep.c don't necessarily describe how Guile's GC
works.
Neil
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Latent bugs?
[not found] ` <87k7huaqy6.fsf@zagadka.ping.de>
@ 2002-12-28 19:37 ` Marko Rauhamaa
0 siblings, 0 replies; 5+ messages in thread
From: Marko Rauhamaa @ 2002-12-28 19:37 UTC (permalink / raw)
Cc: guile-devel
Marius Vollmer <mvo@zagadka.ping.de>:
> Only the stacks (of all threads) and the registers are searched in
> this manner.
I think mentioning this behavior in the Guile documentation would be,
shall we say, worthwhile.
Marko
--
Marko Rauhamaa mailto:marko@pacujo.net http://pacujo.net/marko/
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Latent bugs?
2002-12-28 19:06 ` Neil Jerram
@ 2002-12-29 14:34 ` Han-Wen Nienhuys
2002-12-29 15:17 ` Marius Vollmer
0 siblings, 1 reply; 5+ messages in thread
From: Han-Wen Nienhuys @ 2002-12-29 14:34 UTC (permalink / raw)
Cc: Lynn Winebarger
neil@ossau.uklinux.net writes:
> Barring a more major overhaul than I'm aware of, it is not the case
> that all writable memory participates in GC. Just the stack, heap
> segments (of SCM cells) allocated by Guile, and any specially
> registered roots.
>
> gc_os_dep.c (which comes from the Boehm GC) is only there because it
> includes code for finding the base of the stack on lots of OS's.
This is exactly right. Perhaps gc_os_dep.c should be pruned to remove
dead code.
--
Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Latent bugs?
2002-12-29 14:34 ` Han-Wen Nienhuys
@ 2002-12-29 15:17 ` Marius Vollmer
0 siblings, 0 replies; 5+ messages in thread
From: Marius Vollmer @ 2002-12-29 15:17 UTC (permalink / raw)
Cc: Neil Jerram
Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
> This is exactly right. Perhaps gc_os_dep.c should be pruned to remove
> dead code.
When I first installed it, I did remove some code, but maybe not
enough, or maybe too much. It would be nice to be able to easily pick
up improvements in the 'upstream' Boehm-GC code.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-12-29 15:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <m3adiqil3w.fsf@lumo.pacujo.net>
[not found] ` <0212280430350A.21210@locke.free-expression.org>
[not found] ` <m3isxeousz.fsf@lumo.pacujo.net>
2002-12-28 18:46 ` Latent bugs? Lynn Winebarger
2002-12-28 19:06 ` Neil Jerram
2002-12-29 14:34 ` Han-Wen Nienhuys
2002-12-29 15:17 ` Marius Vollmer
[not found] ` <87k7huaqy6.fsf@zagadka.ping.de>
2002-12-28 19:37 ` Marko Rauhamaa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).