This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Thorsten.Simons
Recipients Thorsten.Simons
Date 2012-12-04.12:43:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za>
In-reply-to
Content
hashlib seems to leak memory when used on a Linux box (whereas the same works fine when run under Windows 7) (tested w/ Python 3.2.1 and 3.2.3)

<snip file "mem.py">
import hashlib

#file = 'B:\\video\\TEST\\01_file_10G'
file = '/video/TEST/01_file_10G'

myhash = hashlib.sha256()

with open(file, "rb") as f:
    for buffer in f:
        myhash.update(buffer)

print('hash =', myhash.hexdigest())
<snip>

On Windows, 'python3 mem.py' occupies roundabout 7 MB memory,
on Linux (OpenSuse 12.2), it quickly acquires all available memory, then all swap, than get's killed.
History
Date User Action Args
2012-12-04 12:43:32Thorsten.Simonssetrecipients: + Thorsten.Simons
2012-12-04 12:43:32Thorsten.Simonssetmessageid: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za>
2012-12-04 12:43:32Thorsten.Simonslinkissue16606 messages
2012-12-04 12:43:31Thorsten.Simonscreate