grow_dictionary

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

grow_dictionary

Gwenaël Casaccio
Hi,

I think that grow_dictionary and grow_identity_dictionary could leak
the newly allocated dictionary when calling _gst_swap_objects: it can tenure
objects and in the worst case will do a GC (no_memory handler is called).
The two objects should be GC protected in the grow*_method.

Do you agree with my statements ?

Cheers,
Gwen


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: grow_dictionary

Paolo Bonzini-2
Il 09/07/2013 03:45, Gwenaël Casaccio ha scritto:
> Hi,
>
> I think that grow_dictionary and grow_identity_dictionary could leak
> the newly allocated dictionary when calling _gst_swap_objects: it can
> tenure
> objects and in the worst case will do a GC (no_memory handler is called).
> The two objects should be GC protected in the grow*_method.
>
> Do you agree with my statements ?

I think you're right, but shouldn't they be protected in
_gst_swap_objects instead?

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk