unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: guile-devel <guile-devel@gnu.org>
Subject: bdw-gc hack
Date: Sat, 3 May 2014 00:07:37 +0200	[thread overview]
Message-ID: <CAGua6m0Wea7iHi2=rvYZRt0-QFuACi_ffpxv-KBk6GmHfHLENA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]

Hi all, I'm working with two paths right now when it comes to gc.

1. Using finalizers, that fails right now
2. A modded version of bdw-gc found at
https://gitorious.org/bdw-gc-logical-mod

I was thinking of showing how the new API in 2) is working, just for the
curious. So:

 GC_new_kind_adv (..., bit)

This is the same as without _adv but with a new argument bit, at the end,
the tag to
mask on the head SCM of the allocated datastructure. the modded gc will
mask on bit
on the head SCM in case it is reached from normal code and hence one can
use this to
probe if a variable is referenced normally or not.


GC_MARK_AND_PUSH_NO_TOUCH(...)

This is the same as the ideom with _NO_TOUCH attached. It will simply mark
the variable
as not for gc and don't pushes the variable onto the stack and onot mask on
the bit. The name should be (I will change it later to GC_MARK_NO_TOUCH(
...))

That's it. I'm not sure that this scheme supports incremental gc, but it is
a nice start to play with the gc. The added overhead is low compared to the
rest of the gc code.

Have fun!
/Stefan

[-- Attachment #2: Type: text/html, Size: 1467 bytes --]

                 reply	other threads:[~2014-05-02 22:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAGua6m0Wea7iHi2=rvYZRt0-QFuACi_ffpxv-KBk6GmHfHLENA@mail.gmail.com' \
    --to=stefan.itampe@gmail.com \
    --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).