unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Chris Vine <chris@cvine.freeserve.co.uk>
To: guile-user@gnu.org
Subject: Re: Need for scm_remember_upto_here_* in guile-2.0
Date: Wed, 23 Sep 2015 17:45:55 +0100	[thread overview]
Message-ID: <20150923174555.1cc0e6ce@bother.homenet> (raw)
In-Reply-To: <8761319v8c.fsf@fencepost.gnu.org>

On Wed, 23 Sep 2015 14:27:15 +0200
David Kastrup <dak@gnu.org> 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	other threads:[~2015-09-23 16:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-12 12:27 Need for scm_remember_upto_here_* in guile-2.0 Chris Vine
2015-09-22 14:54 ` Ludovic Courtès
2015-09-22 15:26   ` David Kastrup
2015-09-22 16:24     ` Mark H Weaver
2015-09-22 17:08       ` David Kastrup
2015-09-22 21:13       ` Ludovic Courtès
2015-09-22 23:35         ` Chris Vine
2015-09-22 23:48           ` Chris Vine
2015-09-23  7:26             ` David Kastrup
2015-09-23  8:41               ` Chris Vine
2015-09-23  8:54                 ` David Kastrup
2015-09-23  9:40                   ` Chris Vine
2015-09-23 12:27                     ` David Kastrup
2015-09-23 16:45                       ` Chris Vine [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150923174555.1cc0e6ce@bother.homenet \
    --to=chris@cvine.freeserve.co.uk \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).