2008/7/21 Georg Brandl <[EMAIL PROTECTED]>:
>>>> b"a"*sys.maxsize
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> MemoryError
> [41297 refs]
>>>> b"a"*sys.maxsize
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "<stdin>", line 1, in <module>
> MemoryError
> [41317 refs]
>>>> b"a"*sys.maxsize
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "<stdin>", line 1, in <module>
>  File "<stdin>", line 1, in <module>
> MemoryError
> [41337 refs]
>
> This probably has to do with the fact that this MemoryError is a prebuilt
> instance.

I corrected this with r65341.
But this prebuilt MemoryError has another nasty consequence:
when PyErr_NoMemory is raised, the traceback is attached to the
prebuilt object,
and all local variables of the failing procedure are still referenced
and will not be freed.

This seems to defeat the purpose of the prebuilt MemoryError...

-- 
Amaury Forgeot d'Arc
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to