guile-devel
[Top][All Lists]
Advanced

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

Re: gen gc


From: Dirk Herrmann
Subject: Re: gen gc
Date: Thu, 18 Jul 2002 18:00:59 +0200 (CEST)

On Thu, 18 Jul 2002, Han-Wen wrote:

> address@hidden writes:
> > Han-Wen <address@hidden> writes:
> > 
> > > How is this supposed to portable to GenGC? 
> > > 
> > >    SCM_DEFINE (scm_object_address, "object-address", 1, 0, 0,
> > >             (SCM obj),
> > >       "Return an integer that for the lifetime of @var{obj} is uniquely\n"
> > >       "returned by this function for @var{obj}")
> > > 
> > > This is used in some of the goops code -- should I retain it? 
> > 
> > It would be cool if you could fake it.  It doesn't need to be the real
> > memory address of the object, just a unique integer.
> 
> ?
> 
> What if I can't?  Memory cells are going to move around. I don't see a
> way to generate a unique number without making some kind of table for
> objects subjected to object-address. 
> 
> Btw, I can imagine that internal hash tables might use the address of
> a cell as a source for a hash index. Does that happen anywhere?

Look into hash.[ch].  scm_hashq seems to be what you think of.

Best regards,
Dirk Herrmann




reply via email to

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