Travis Oliphant <[EMAIL PROTECTED]> writes:

> Bingo.  Yes, definitely allocating new _types_ (an awful lot of them...) 
> --- that's what the "array scalars" are: new types created in C.

Ah!  And, er, why?

> If they don't get properly collected then that would definitely have
> created the problem.

types do get collected -- but only after the cycle collector has run.
If you can still reproduce the problem can you try again but calling
'gc.set_threshold(1)'?

> It would seem this should be advertised when telling people to use
> PyObject_New for allocating new memory for an object.

Nevertheless, I think it would be good if pymalloc freed its arenas.
I think the reasons it doesn't are because of worries that people
might be called PyObject_Free without holding the GIL, but that's been
verboten for several years now so we can probably just let them
suffer.

I think there's even a patch on SF to do this...

Cheers,
mwh

-- 
  The use of COBOL cripples the mind; its teaching should, therefore,
  be regarded as a criminal offence.
           -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to