1
import hashlib
with open("file5GB.bin" , 'rb') as fd:
    md5 = hashlib.md5()
    while True:
        data = fd.read(2**20)
        if not data:
            break
        md5.update(data)
    md5_local = md5.hexdigest()
    print md5_local

results in MemoryError: Exception of type 'System.OutOfMemoryException' was thrown.

The same code works fine with python.

Ironpython version : 2.7.5,FileSize : 5GB

0 Answers0