From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: bdw-gc hack Date: Sat, 3 May 2014 00:07:37 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b6d7fb46f6ef204f8720270 X-Trace: ger.gmane.org 1399068476 19383 80.91.229.3 (2 May 2014 22:07:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 May 2014 22:07:56 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat May 03 00:07:48 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WgLcR-0007D7-1H for guile-devel@m.gmane.org; Sat, 03 May 2014 00:07:47 +0200 Original-Received: from localhost ([::1]:46477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgLcQ-0004OZ-Hy for guile-devel@m.gmane.org; Fri, 02 May 2014 18:07:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgLcK-0004OM-SV for guile-devel@gnu.org; Fri, 02 May 2014 18:07:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgLcJ-000378-KR for guile-devel@gnu.org; Fri, 02 May 2014 18:07:40 -0400 Original-Received: from mail-pd0-x22e.google.com ([2607:f8b0:400e:c02::22e]:59184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgLcJ-000370-CN for guile-devel@gnu.org; Fri, 02 May 2014 18:07:39 -0400 Original-Received: by mail-pd0-f174.google.com with SMTP id w10so4124962pde.5 for ; Fri, 02 May 2014 15:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=CzkQXRkxCv81z3OSZLDUSzsG67nkUL1aXcBqR2rmWaE=; b=FShF2wGaAOBjGbVUTzE2lz1mbIg0jMqmTmvKHKHgW1A4HD5CIrqG4tV+As8BGpe3ps ImbM3l0JNLc/aYux2IXomFRvBW6lkJx3mL/gdEk1aJ/mdIESVl2ouH/+t3aJoRuqV8vj 7V1egxGiLOUqqtERIS6/z9mN61VfixaezC7nImy/kEyYq/YIit8QFvzEXrYHvH3ibtt+ 3epURXJzmJqqN66NlNapYjcSOpaiPwWgvM1SK40bqbYgqOz8gkf1vWQ8DwWap+TK4GfH kjxaPea3GmooNTiELVHwLcUTLIGGqUx1NairD+uV14K7co8zbUG28Gkjh+1NmPiZonCG uo/w== X-Received: by 10.66.164.135 with SMTP id yq7mr39512807pab.126.1399068457658; Fri, 02 May 2014 15:07:37 -0700 (PDT) Original-Received: by 10.70.85.34 with HTTP; Fri, 2 May 2014 15:07:37 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::22e X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17130 Archived-At: --047d7b6d7fb46f6ef204f8720270 Content-Type: text/plain; charset=UTF-8 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 --047d7b6d7fb46f6ef204f8720270 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all, I'm working with two paths right now when it c= omes to gc.

1. Using finalizers, that fails right now
2. A modded version of bdw-gc found at=C2=A0https://gitorious.org/bdw-gc-logical-mod<= /div>

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

=C2=A0GC_new_k= ind_adv (..., bit)

This is the same as without _ad= v but with a new argument bit, at the end, the tag to
mask on the head SCM of the allocated datastructure. the modded gc wil= l mask on bit
on the head SCM in case it is reached from normal c= ode and hence one can use this to
probe if a variable is referenc= ed normally or not.


GC_MARK_AND_PUSH_NO_TOUCH(...)
=

This is the same as the ideom with _NO_TOUCH atta= ched. 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 sho= uld be (I will change it later to GC_MARK_NO_TOUCH( ...))

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

Have fun!
/Stefan
--047d7b6d7fb46f6ef204f8720270--