[Python-Dev] Re: [Python-checkins] python/dist/src/Objects typeobject.c, 2.242, 2.243

Tim Peters tim.one at comcast.net
Sat Aug 9 01:55:45 EDT 2003


[Michael Hudson]
> This is deeply weird.  Watch:
>
> [mwh at pc150 build-debug]$ ./python.exe
> Python 2.4a0 (#25, Aug  8 2003, 14:17:07)
> [GCC 3.1 20020420 (prerelease)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from test import test_support
> [40915 refs]
>>>> test_support.verbose = 0
> [41028 refs]

We're different already:  my total refs stay at a comparatively slim 21426
after both initial lines.  Maybe you're tracking a leak due to GNU readline?

As for the rest, mine leaks 166 references per stab without variation:

>>> import gc
[40804 refs]
>>> for i in range(5):
...  test_descr.test_main(); gc.collect()
...
226
250
250
250
250
[49410 refs]
>>> test_descr.test_main(); gc.collect()
250
[49576 refs]
>>> test_descr.test_main(); gc.collect()
250
[49742 refs]
>>> test_descr.test_main(); gc.collect()
250
[49908 refs]
>>> test_descr.test_main(); gc.collect()
250
[50074 refs]
>>> test_descr.test_main(); gc.collect()
250
[50240 refs]
>>> test_descr.test_main(); gc.collect()
250
[50406 refs]
>>> test_descr.test_main(); gc.collect()
250
[50572 refs]
>>> test_descr.test_main(); gc.collect()
250
[50738 refs]
>>> test_descr.test_main(); gc.collect()
250
[50904 refs]
>>>

etc.

Hmm -- I'm not sure my 2.4 build is entirely up to date, though.




More information about the Python-Dev mailing list