Open pashashocky opened 4 years ago
Using .update method of a bounter counter with anothe counter has a memory leak.
printing would be useful, but here's the idea
def mem_leak(): get_mem() c1 = bounter.bounter() c2 = bounter.bounter() for i in range(10**7): c1[random.randint(0,10)] += 1 c2[random.randint(0,10)] += 1 get_mem() c1.update(c2) get_mem() def get_mem(): print(psutils.Process(os.getpid()).memory_full_info().rss / 2 ** 20) # in mb get_mem() mem_leak() get_mem() mem_leak() get_mem()
Expect counters c1 and c2 to completely be destroyed from memory after mem_leak function exits.
Some memory remains used even after mem_leak function exits.
can't run versions, but: Linux 4.14 amzn linux x86 Python 3.6.6 Numpy 1.16.4 pandas 0.24.2 bounter 1.1.0
@mpenkov
Description
Using .update method of a bounter counter with anothe counter has a memory leak.
Steps/Code/Corpus to Reproduce
printing would be useful, but here's the idea
Expected Results
Expect counters c1 and c2 to completely be destroyed from memory after mem_leak function exits.
Actual Results
Some memory remains used even after mem_leak function exits.
Versions
can't run versions, but: Linux 4.14 amzn linux x86 Python 3.6.6 Numpy 1.16.4 pandas 0.24.2 bounter 1.1.0
@mpenkov