memory leak with large list??

Tim Peters tim.one at comcast.net
Sat Jan 25 21:14:59 EST 2003


[Bengt Richter]
> Why do you need to duplicate the type pointer for all those?

That's the way it is, and countless lines of code-- both in the core and in
extension modules --rely on being able to get at the type object from a
PyObject* p via p->ob_type.

> I.e., if you allocated space in decent-size arrays of object
> representations without type pointer, and just reserved a header
> slot in front of the array, ... [etc] ...

This can't be changed now.

> ...
> I wonder what the performance hit would be, given processor
> speeds and caching etc.
> Or has this been tried and rejected for Python?

Tried no, rejected yes <wink>.






More information about the Python-list mailing list