(original) (raw)

I recall finding memory leaks using this. (E.g. I remember a leak in Zope due to a cache that was never pruned.)

But presumably gc.get\_objects() would have been sufficient. (IIRC it didn't exist at the time.)

On Wed, Apr 10, 2019 at 11:48 AM Steve Dower <steve.dower@python.org> wrote:
On 10Apr2019 1109, Steve Dower wrote:
\> On 10Apr2019 0401, Victor Stinner wrote:
\>>> I think it's worthwhile if we can really get to debug and non-debug
\>>> builds being ABI compatible. Getting partway there in this case doesn't
\>>> seem to offer any benefits.
\>>
\>> Disabling Py\_TRACE\_REFS by default in debug mode reduces the Python
\>> memory footprint. Py\_TRACE\_REFS costs 2 pointers per PyObject: 16
\>> bytes on 64-bit platforms.
\>
\> Right, except it's debug mode.

I left this comment unfinished :)

It's debug mode, and so you should expect less efficient memory and CPU
usage. That's why we have two modes - so that it's easier to debug issues.

Now, if debug mode was unusably slow or had way too much overhead, we'd
want to fix that. But it isn't unusable, so reducing memory usage at the
cost of making debugging harder is not compelling.

Cheers,
Steve
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org


--
--Guido van Rossum (python.org/\~guido)
Pronouns: he/him/his (why is my pronoun here?)