[issue24085] large memory overhead when pyc is recompiled

INADA Naoki report at bugs.python.org
Tue Jul 3 09:12:34 EDT 2018


INADA Naoki <songofacandy at gmail.com> added the comment:

In case repro2, unreturned memory is in glibc malloc.
jemalloc mitigates this issue.
There are some fragmentation in pymalloc, but I think it's acceptable level.

$ python3 -B repro2.py
ready
<module 'anon_city_hoods' from '/home/inada-n/anon_city_hoods.py'>
1079124
VmHWM:   1079124 kB
VmRSS:     83588 kB

$ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 python3 -B repro2.py
ready
<module 'anon_city_hoods' from '/home/inada-n/anon_city_hoods.py'>
1108424
VmHWM:   1108424 kB
VmRSS:     28140 kB

----------
nosy: +inada.naoki

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24085>
_______________________________________


More information about the Python-bugs-list mailing list