unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org, Neil Jerram <neil@ossau.uklinux.net>
Subject: Re: [PATCH] Configure GMP to use GC allocation functions, remove bignum finalizers
Date: Sun, 27 Nov 2011 22:25:50 +0100	[thread overview]
Message-ID: <8762i5mf4x.fsf@gnu.org> (raw)
In-Reply-To: <87zkfh9x8r.fsf@pobox.com> (Andy Wingo's message of "Sun, 27 Nov 2011 20:33:08 +0100")

Hi!

Andy Wingo <wingo@pobox.com> skribis:

> I still this this is a good idea.  The key would be to GC more often
> when the heap image grows faster than GC'd memory is allocated.  We can
> detect this situation by computing (ImageSize_t+1 - ImageSize_t) /
> (LiveBytes_t+1 - LiveBytes_t), where ImageSize is some measure of the
> total process size, perhaps via getrusage(), and LiveBytes is
> GC_get_heap_size() - GC_get_free_bytes().

The problem is that this measurement doesn’t allow us to differentiate
between a growing heap with objects that may be freed as a result of
running the GC, and a growing heap just because the application needs
more malloc’d objects.

(I think this is the argument that was made against my __malloc_hook
patch back then. [0])

A longer term option may be to augment libgc with something akin to our
old scm_gc_register_collectable_memory.

WDYT?

Thanks,
Ludo’.

[0] http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/4371



  reply	other threads:[~2011-11-27 21:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31 19:48 [PATCH] Configure GMP to use GC allocation functions, remove bignum finalizers Mark H Weaver
2011-05-31 20:07 ` Mark H Weaver
2011-05-31 21:52 ` Ludovic Courtès
2011-05-31 23:18   ` Neil Jerram
2011-05-31 23:32     ` Neil Jerram
2011-06-01  8:34     ` Andy Wingo
2011-06-02 23:14       ` Ludovic Courtès
2011-11-27 19:33       ` Andy Wingo
2011-11-27 21:25         ` Ludovic Courtès [this message]
2011-11-28 22:23           ` Andy Wingo
2011-11-28 23:10             ` Ludovic Courtès
2011-11-28 23:50               ` Andy Wingo
2011-11-29 11:06                 ` Ludovic Courtès
2011-11-29 11:35                   ` Andy Wingo
2011-11-29 13:20                     ` Ludovic Courtès
2011-11-29 12:45                   ` Andy Wingo
2011-11-29 13:18                     ` Ludovic Courtès
2011-11-29 14:44                       ` Andy Wingo
2011-11-29 16:22                         ` Ludovic Courtès
2011-12-02 11:10           ` Andy Wingo
2011-12-02 17:02             ` Ludovic Courtès
2011-12-02 18:12               ` Andy Wingo
2011-12-02 22:17                 ` Ludovic Courtès
2011-12-03 10:57                   ` Andy Wingo
2011-12-03 17:57                     ` 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=8762i5mf4x.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=neil@ossau.uklinux.net \
    --cc=wingo@pobox.com \
    /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).