[Top][All Lists]

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

Re: gen gc

From: Han-Wen Nienhuys
Subject: Re: gen gc
Date: Thu, 18 Jul 2002 14:08:10 +0200

address@hidden writes:
> >>>   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}")

> >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. 
> >  
> >
> Actually it only says it should be unique, not never-changing. In 
> particular,
> all it needs for eq? to grok it is uniqueness. I guess just returning 
> the address
> ought to work, no?

It says "for the lifetime of this object".

Anyways, the goops code only uses the address for printing, so it
would safe to return the address. I suggest that the documentation be
changed to

        "Return the address of OBJ as an integer. Note that this
        address may change between runs due to garbage collection."


Han-Wen Nienhuys   |   address@hidden    |

reply via email to

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