guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need for scm_remember_upto_here_* in guile-2.0


From: Chris Vine
Subject: Re: Need for scm_remember_upto_here_* in guile-2.0
Date: Wed, 23 Sep 2015 17:45:55 +0100

On Wed, 23 Sep 2015 14:27:15 +0200
David Kastrup <address@hidden> wrote:
[snip]
> No, I cannot give you hard and fast rules for woods.  I still have my
> preferences, and there are reasons for them.  And there may be
> multiple reasons that are mostly independent.

I wasn't asking for rules.  I was trying to extract your meaning in an
intelligible form.

I think what you are approximately saying is that libgc as a
conservative garbage collector is not particularly good in all cases
(although I suspect that that is more likely to result in leaks rather
than unwanted finalisation), that notwithstanding this it is better at
detecting whether an allocated smob cell is still in use rather than
some other things (of which the allocated data struct kept by the smob
cell and any arrays are an example), and that therefore you think you
are generally better off in letting libgc handle the smob cell with
diligent use of remembering by the programmer, and handle other things
yourself, including the smob's data struct and its members, by
allocating them with malloc() and by explicit deallocation in the
smob's finalisers (which in turn means you need a mark function for any
SCM members of a malloc()'ed smob struct, which doesn't apparently work
correctly).

My modest requirements mean that I do not need to follow your advice,
but even so I am grateful for your views.

Chris



reply via email to

[Prev in Thread] Current Thread [Next in Thread]