How to interrup a deep recursion

John M McIntosh johnmci at smalltalkconsulting.com
Mon Apr 7 05:55:47 UTC 2003


Having looked into this in the past, what happens is that when memory  
gets low, aka infinite recursion, why the memory allocation logic, just  
invokes a full GC cycle hoping to clean up the problem. This doesn't  
really work, it's not if there is memory free, but perhaps we get  
sufficent space to allocate one more object, then we run bytecodes  
until we need to allocate another object, ah like a context record,  
then repeat, so this becomes slow slow slow. Hard for the poor UI to  
wakeup sufficently.


I'll note the space limit is set to 200000 just follow the logic from
SystemDictionary>>installLowSpaceWatcher


MMM now I wonder if you tracked space usage by Process instance if you  
could nail the fellow that was busy doing all the allocation. MMM I  
wonder. In the past I collected clock time active totals by process at  
process switch time, bet we could nail the nasty process and fail the  
new, much like many operating systems that enforce rules about resource  
consumption.

On Sunday, April 6, 2003, at 10:20  PM, Tim Rowledge wrote:

> Ned Konz <ned at bike-nomad.com> wrote:
>
>> On Sunday 06 April 2003 12:29 pm, Stephane Ducasse wrote:
>>
>>> On mac os x I tried all the keyboard combination I could imagine
>>> without been able to interrupt a deep recursion.
>>> What is the way to interrupt Squeak?
>>
>> Cmd-.
>>
>> But you can't interrupt processes at a higher priority than the
>> interrupt watcher, and if you don't have an exception handler at the
>> right place in the UI process you can't interrupt it either.
> Actually I've noticed that it can be terribly difficult to interrupt  
> the
> system at times. This would be on all three of my machines, Acorn, Mac
> & linux. Two symptoms come to mind; either simply no response  
> whatsoever
> or a notifier showing [] newProcess followed by another one
> withaslightly more logical looking short-stack which proceeds to drop
> the focus and then.... nothing. No control. Another interrupt gets the
> same. Only 'solution' seems to be forced exit which is very
> unsatisfactory.
>
> tim
> --  
> Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
> Oxymorons: Advanced BASIC
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===



More information about the Squeak-dev mailing list