Message176907
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. |
|
Date |
User |
Action |
Args |
2012-12-04 12:43:32 | Thorsten.Simons | set | recipients:
+ Thorsten.Simons |
2012-12-04 12:43:32 | Thorsten.Simons | set | messageid: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za> |
2012-12-04 12:43:32 | Thorsten.Simons | link | issue16606 messages |
2012-12-04 12:43:31 | Thorsten.Simons | create | |
|