unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* bdw-gc hack
@ 2014-05-02 22:07 Stefan Israelsson Tampe
  0 siblings, 0 replies; only message in thread
From: Stefan Israelsson Tampe @ 2014-05-02 22:07 UTC (permalink / raw)
  To: guile-devel

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-02 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-02 22:07 bdw-gc hack Stefan Israelsson Tampe

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).