pyahocorasick
pyahocorasick copied to clipboard
memory leak for python2
demo code:
import os import psutil import ahocorasick
def build_automaton(): automation = ahocorasick.Automaton() for i in range(2000000): automation.exists(str(i))
def show_used_memory(): print('memory used: {} M'.format(psutil.Process(os.getpid()).memory_info().rss / (1024. ** 2)))
if name == 'main': build_automaton() show_used_memory()
build_automaton()
show_used_memory()
build_automaton()
show_used_memory()
for python2, result: memory used: 162.6875 M memory used: 255.78125 M memory used: 348.8828125 M
for python3, result: memory used: 10.23046875 M memory used: 10.26171875 M memory used: 10.26171875 M
thanks!
Thank you for the report.
any plans to fix this?
i have the same problem.
@eddy-avanan Not at that moment, but I'll try to look at this issue. It seems to be a regression, as we already had similar problem and it was solved.
Any updates on memory leak issue for python 2?
@galanamanj could you try to run the tests listed in the release-checklist.txt file on your Python 2 installation? In particular the valgrind tests.
Actual help to track (and fix) these would be mucho welcomed!
I am closing for lack of activity. Please reopen if you feel strongly about it, though Python 2 really fell out of fashion these days ;)