[pypy-dev] pypy GC on large objects Re: funding/popularity?

Dima Tisnek dimaqq at gmail.com
Thu Dec 23 20:30:20 CET 2010


Basically collecting this is hard:

dict(a=range(9**9))

large list is referenced, the object that holds the only reference is
small no matter how you look at it.

I guess it gets harder still if there are many small live objects, as
getting to this dict takes a while
(easier in this simple case with generataional collector, O(n) in general case)


On 23 December 2010 06:38, Armin Rigo <arigo at tunes.org> wrote:
> Hi René,
>
> On Thu, Dec 23, 2010 at 2:33 PM, René Dudfield <renesd at gmail.com> wrote:
>> I think this is a case where the object returned by
>> ctypes.create_string_buffer() could use a correct __sizeof__ method
>> return value.  If pypy supported that, then the GC's could support
>> extensions, and 'opaque' data structures in C too a little more
>> nicely.
>
> I think you are confusing levels.  There is no way the GC can call
> some app-level Python method to get information about the objects it
> frees (and when would it even call it?).  Remember that our GC is
> written at a level where it works for any interpreter for any
> language, not just Python.
>
>
> A bientôt,
>
> Armin.
> _______________________________________________
> pypy-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/pypy-dev
>



More information about the Pypy-dev mailing list