From: Kevin Ryde <user42@zip.com.au>
Subject: Re: doco scm_remember_upto_1
Date: Thu, 12 Jun 2003 09:07:54 +1000 [thread overview]
Message-ID: <877k7snrg5.fsf@zip.com.au> (raw)
In-Reply-To: 87isrpjx0a.fsf@zagadka.ping.de
Marius Vollmer <mvo@zagadka.de> writes:
>
> But this is not the case, a GC will only run when all threads are
> in a safe place and have been stopped.
Right, yep. I reworded it in a more direct sense as follows, dropping
the "it might be thought" business, which was only really me getting
wrong ideas.
In a multi-threaded program, the rule is the same. As far as a
given thread is concerned, a garbage collect still only occurs
within a memory allocation function, not at an arbitrary time.
(Guile waits for all threads to reach a memory function, and holds
them there while the collector runs.)
> But when in doubt, be
> conservative: include the call to scm_remember_upto_here_1 when
> you are not sure that it is safe to leave it out.
I think I'd rather see something unambiguous said about when a
remember must be used, instead of talking about being unsure. I tried
to reword a little to emphasise it's memory activity which provokes a
gc.
> A call to
> scm_remember_1 will cost at most as much as a call to an empty
> function.
Or less, if the asm block approach is right, or if storing to a global
"volatile" variable would similarly be right. :-)
> Is that important? A note that says that the non-varargs functions
> might be more efficient should suffice, no?
I'm only thinking to encourage the best way. I suppose the cost is
always going to be small compared to real work done, it's just a case
of not wanting to go along an inferior path.
In any event, I checked in the new section.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2003-06-11 23:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-21 23:15 doco scm_remember_upto_1 Kevin Ryde
2003-05-22 7:07 ` Rob Browning
2003-05-22 9:42 ` Marius Vollmer
2003-05-22 15:21 ` Rob Browning
2003-05-24 1:19 ` Kevin Ryde
2003-05-30 0:04 ` Kevin Ryde
2003-06-01 21:41 ` Marius Vollmer
2003-06-11 23:07 ` Kevin Ryde [this message]
2003-06-18 23:36 ` Marius Vollmer
2003-06-21 23:02 ` Kevin Ryde
2003-07-27 14:49 ` Marius Vollmer
2003-05-30 13:26 ` Marius Vollmer
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=877k7snrg5.fsf@zip.com.au \
--to=user42@zip.com.au \
/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).