l = range(int(1E9))

Cecil Westerhof Cecil at decebal.nl
Thu Apr 30 12:06:02 EDT 2015


If I execute:
    l = range(int(1E9)

The python process gobbles up all the memory and is killed. The
problem is that after this my swap is completely used, because other
processes have swapped to it. This make those programs more slowly. Is
there a way to circumvent Python claiming all the memory?

By the way: this is CPython 2.7.8.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof



More information about the Python-list mailing list