|
![](/i/fill.gif) |
clipka wrote:
> BTW, it's not harddrive life that worries me in such situations, but the
> bare struggle to get the system's attention back. Try killing a
> swapping-mad program when it keeps thrashing the task manager out of
> main memory... >_<
Heh. Fun... Actually, the one I usually have trouble with is Alt+Tab
from a game back to the Windows desktop. Takes several lifetimes in both
directions. No idea why.
One thing I discovered back at uni: If your Java program accidentally
goes into an infinite loop, it dies almost instantly with a stack
overflow. If your Smalltalk program accidentally loops forever, it's
usually a few minutes before you realise that it's actually filling the
entire VM address space with garbage. Now try stopping it. :-)
Literally, it's so determined to follow your instructions as efficiently
as possible that for a while you don't even realise what's wrong. It
just looks like it's "busy".
Of course, infinite loops are much, much more common in Smalltalk. A
very common idiom is to write
#new
super new.
...stuff...
But if, by some slip, you instead write
#new
self new.
...stuff...
...then calling #new immediately calls #new, creating an endless
allocation loop. o_O
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |