chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1173: Symbols held in GC-roots are sometimes col


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1173: Symbols held in GC-roots are sometimes collected in "symbol-gc" mode
Date: Sun, 21 Aug 2016 19:02:20 -0000

#1173: Symbols held in GC-roots are sometimes collected in "symbol-gc" mode
-----------------------------+-------------------
  Reporter:  felix           |      Owner:
      Type:  defect          |     Status:  new
  Priority:  major           |  Milestone:  5.0
 Component:  core libraries  |    Version:  4.9.x
Resolution:                  |   Keywords:
-----------------------------+-------------------

Comment (by sjamaan):

 hm, if I change `rescan` in `C_reclaim` like this, it's very fast, because
 it skips symbol GC like the original code did:

 {{{
 #!c
 if(n > 0 && (h & C_BYTEBLOCK_BIT) == 0) {
   if(h & C_SPECIALBLOCK_BIT) {
     /* Minor GC needs to be fast; always mark weakly held buckets */
     if (gc_mode != GC_MINOR || h != C_WEAK_BUCKET_TAG) {
       --n;
       ++p;
     }
   }

   while(n--) mark(p++);
 }
 }}}

 I'm not sure how much I like this: the loop is supposed to be as fast as
 possible, and adding another (highly specific) check in there seems a bit
 ugly.

 `WEAK_BUCKET_TAG` is defined as `(C_BUCKET_TYPE | C_SPECIALBLOCK_BIT |
 (C_SIZEOF_BUCKET - 1))` of course.  We **could** still define it as
 `(C_PAIR_TYPE | C_SPECIALBLOCK_BIT | (C_SIZEOF_PAIR - 1))` to get rid of
 the bucket type.

 It would be nice if we can make this behave more generically. Then we can
 make locatives work exactly like this, as well, and theoretically we could
 add other weak types too.

--
Ticket URL: <http://bugs.call-cc.org/ticket/1173#comment:12>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]