[Gc] GC_base returns non null for a freed pointer

Guilhem Lavaux guilhem at kaffe.org
Tue Aug 17 01:15:41 PDT 2004


Hans Boehm wrote:

>This is normal.  It would be relatively expensive to do something
>different without having GC_free store a magic number in free objects,
>or the like.  GC_free puts the object on a free list, but doesn't
>otherwise label it.
>
>Is this a problem?  The current semantics have generally been OK for what
>I've needed.
>
>  
>

Actually, I have tried this morning to pass through this limitation and 
it is very hard without changing the logic completely in kaffe. Is it 
really difficult to add a flag in object header or invalidate an object 
in the freelist ? It could be possible to reclaim it afterward just by 
clearing it in GC_*_malloc.

>Hans
>
>On Mon, 16 Aug 2004, Guilhem Lavaux wrote:
>
>  
>
>>Hi,
>>
>>I have merged a kaffe interface to gc6.3 in the kaffe's CVS head and
>>I've noticed that if I  free an object (using GC_free) GC_base continues
>>returning a non-null pointer. Is it the normal behaviour ?
>>
>>Regards,
>>
>>Guilhem Lavaux.
>>
>>P.S.: I have just subscribed to the mailing list so I apologize if the
>>question has already been asked.
>>_______________________________________________
>>Gc mailing list
>>Gc at linux.hpl.hp.com
>>http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
>>
>>    
>>
>
>  
>



More information about the Gc mailing list