From: Han-Wen Nienhuys <hanwen@xs4all.nl>
To: guile-devel@gnu.org
Subject: Re: GUILE_MAX_HEAP_SIZE
Date: Tue, 19 Aug 2008 05:22:57 -0300 [thread overview]
Message-ID: <g8dvv9$lng$1@ger.gmane.org> (raw)
In-Reply-To: <87d4k6nx2a.fsf@gnu.org>
Ludovic Courtès escreveu:
>>> hell = scm_calloc (hell_size * sizeof (*hell));
>>>
>>> `sizeof (*hell)' is actually `sizeof (scm_t_bits *)', which is equal
>>> to `sizeof (scm_t_bits)', but using `sizeof (*hell)' is clearer and
>>> less error-prone.
>>>
>>> Besides, is that code only used when the one changes the class of an
>>> instance? How did you trigger it?
>> valgrind. Fixed.
>
> Sorry, I meant: which Scheme code leads to the execution of that code?
I have no idea. Some part of the test suite exercises it, but I think it is
better not to leave such an obvious error there.
>>> Hmm, well, we really need an `SCM_MIN ()' somewhere. I'd rather
>>> duplicate its definition than expand it as you did here, since that
>>> makes the code rather unreadable.
>> I called private-gc.h private for a reason. Please do not include it
>> unless you are called libguile/gc*c; feel free to transplant SCM_MIN to
>> someplace else.
>
> I agree on that, but I also think that expanding `SCM_MIN ()' in-place
> is not a good idea.
I agree with that, it's just that I prefer to let my responsibility end
at the boundaries of the GC code.
>>> * 569aa529d5379f3c942fa6eb01e8a1ad48ba9f77
>>> Use word_2 to store mark bits for freeing structs and vtables in the
>>> correct order.
>>>
>>> Can you explain this? Suppose we have struct S whose vtable is V;
>>> V cannot be swept in the same GC cycle as S since it's still
>>> referenced by S. Thus, I don't understand the need for
>>> special-casing here.
>> Freeing S requires a function stored in V.
>
> Right, but my understanding is that V is still reachable (via S) when S
> becomes candidate for sweeping. Is that right?
No, the freeing is all for unreachable objects. The problem is that unreachable
objects also may have an ordering: S needs to be freed before V, even if both are
unreachable.
>>> `ensure_marking ()' must be `static'. The definition of
>>> `scm_i_marking' clearly doesn't belong in a header. Besides, all
>>> this is unused, so what's the point?
>> I'm not sure where to put the code, perhaps in a ifdef DEBUG or something:
>> the point was to extend SCM_GC_SET_MARK with ensure_marking() to catch illegal
>> use of the mark bits.
>
> But it's actually unused (at least in this commit), so I'd just remove
> it.
Yes - it's not ideal. I would vote for keeping the is_marking variable, and
perhaps dropping the ensure_marking() function. (My experience is that the
#ifdef DEBUG sections are never exercised, because noone ever bothers to test
and use those secions.)
>> Also, if a core contributor apparently need some sort of review process to push
>> code they feel comfortable with, can you please post a link to the process?
>
> There's no such document, just an observation of what has been common
> practice since I follow Guile development (c. 2004).
FWIW, GUILE development seems from the outside very much stagnant,
even if there are the occasional commits to the master branch. Perhaps I have
various preconceptions because I also follow LilyPond development, which is
more turbulent, with more mistakes going in at a higher pace, but also more
discussion and more bugfixing going in at a higher pace.
--
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
next prev parent reply other threads:[~2008-08-19 8:22 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 5:11 GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-13 9:35 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-13 15:04 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-14 5:09 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-14 7:56 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-16 19:13 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-16 19:24 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-17 21:51 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-18 19:08 ` GUILE_MAX_HEAP_SIZE Andy Wingo
2008-08-21 20:27 ` Gnulib files now in the repository Ludovic Courtès
2008-08-16 0:43 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-16 0:47 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-17 22:26 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-18 7:43 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-18 14:18 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-18 14:31 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-18 15:34 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-19 8:54 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-19 13:53 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-19 15:46 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-21 18:36 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-22 2:06 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-22 3:36 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-22 18:46 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-09-09 20:50 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-09-10 2:05 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-09-10 7:38 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-22 2:29 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-22 7:39 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-18 7:54 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-18 14:10 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-18 15:48 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-19 8:22 ` Han-Wen Nienhuys [this message]
2008-08-18 15:55 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-19 8:10 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-19 8:16 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-19 23:03 ` GOOPS memory corruption in `go_to_hell ()' Ludovic Courtès
2008-08-19 9:00 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
2008-08-22 9:42 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-22 22:32 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
2008-08-23 2:25 ` GUILE_MAX_HEAP_SIZE Han-Wen Nienhuys
-- strict thread matches above, loose matches on Subject: below --
2008-08-14 11:49 GUILE_MAX_HEAP_SIZE dsmich
2008-08-14 12:32 ` GUILE_MAX_HEAP_SIZE Ludovic Courtès
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='g8dvv9$lng$1@ger.gmane.org' \
--to=hanwen@xs4all.nl \
--cc=guile-devel@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).