Weak reference proposal questions

Andreas Rottmann <[email protected]> Sun, 24 Oct 2004 20:25:59 +0200
Newsgroups gmane.lisp.scheme.pika.devel
Message-ID <[email protected]>
Hi!

I'm thinking about implementing weak references, following Tom's
proposal [0].

[0] http://lists.gnu.org/archive/html/pika-dev/2004-05/msg00019.html

There are some questions I have about this. First, the layout of a "GC
page" is proposed as follows:


        |  hash-bucket |  obj1 | obj2 | obj3 | ... | objN |
                |
                V
              | next-bucket | hashq1 . weak1 | hashq2 . weak2 | .... 


So, when I'm want to look up the hashq value for objX, how do I find
the hash-bucket pointer? This is (efficiently) solvable by using
posix_memalign [1], so is that what's intended, or did I miss
something?

Second, what is the next-bucket field intended for? It occurs only in
this graphic, and is not mentioned in the text...

[1] I already have the basics of a patch to bring that to hackerlab,
    developed when I did the memchunk stuff.

Regards, Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | [email protected]
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Python is executable pseudocode, Perl is executable line-noise.