Python hits the spot

Pär Kurlberg kurlberg at math.chalmers.se
Sun Jun 23 16:19:51 EDT 2002


> It's no wonder that 1000 lines of uncommented code behave like that, taking
> into account that you were trying to integrate several (Tcl/Tk, Fortran, C,
> Python) systems in a hurry, and, I presume, not knowing most of them.

Funny you should mention this.  On my laptop (IBM Thinkpad with 128
megs of ram) the following two-liner gets me a lockup (i.e. keyboard
and mouse completely unresponsive, powertoggle needed):

for i in range(50*1000*1000):
   pass

(I am serious.)  Happened some time ago, but I never got around to
filing a bug report (this thread was a good reminder.)  Seems like the
python code exercises the linux VM/swap to the breaking point.  It is
rather annoying that a user space program can do this...

Can someone else reproduce this behaviour?  (Make sure to quit all
important applications before you try!)

Some trivia:
Python 2.2.1 (#1, Jun 12 2002, 17:57:17)
[GCC 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)] on linux2







More information about the Python-list mailing list