[Python-de] Python Memory Limits
Alexander Crössmann
alexander.croessmann at gmail.com
Fr Sep 9 09:01:16 CEST 2011
"".join(map(str,range(10**8)))
lief bei mir in ca. 2s durch und brauchte ca. 10GB RAM (von 16GB).
"".join(map(str,range(10**9)))
hat im interaktiven Modus aber dazu geführt, dass Ubuntu komplett
eingefroren ist und nur noch über den Gehäuseschalter zu beenden war.
Viele Grüße
Alex
Am 09.09.2011 08:15, schrieb Thomas Lehmann:
> Es gibt viele Möglichkeiten:
>
> def calculateString():
> return "".join(map(str,range(10**8)))
>
> Traceback (most recent call last):
> File "Dummy.py", line 5, in<module>
> print(exceedMemory1())
> File "Dummy.py", line 3, in exceedMemory1
> return "".join(map(str,range(10**8)))
> MemoryError
>
> _______________________________________________
> python-de maillist - python-de at python.org
> http://mail.python.org/mailman/listinfo/python-de
Mehr Informationen über die Mailingliste python-de