Min RK added the comment:

This patch fixes the memory leak in split-dict resizing.

Each time dict_resize is called, it gets a new, larger size `> minused`. If 
this is triggered many times, it will keep growing in size by a factor of two 
each time, as the previous size is passed as minused for the next call.

Set the lower bound at minused (inclusive), rather than exclusive, so that the 
size does not continue to increase for repeated calls.

A test is added to test_dict.py based on the earlier test script, but if 
someone has a simpler way to trigger the split-dict resize events, I'd be happy 
to see it.

----------
keywords: +patch
Added file: 
http://bugs.python.org/file44659/0001-Avoid-unbounded-growth-in-dict_resize.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28147>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to