MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Big strings => panic



On Fri, 19 Apr 1996, Matthew Sanderson wrote:

> It seems MOO server 1.7.8p4 panics when a string gets extremely long (I'm
> not sure exactly how long, but I would guess LONG long).

> foo = " ";
> while(1)
>   foo = foo + foo;
>   $command_utils:suspend_if_needed(0);
> endwhile

It's not a "bug" per se, nor is it something easily fixed.

What happens is simply that when a variable (list or string) gets very 
large, the server runs out of memory.  (The process hits a process-memory 
limit, the memory manager is unable to allocate a contiguous block of 
memory large enough, in extreme cases the swap space is exhausted.)  When 
the server runs out of memory, it panics -- and in this case probably 
produces one *very large* panic dump.

The MOO execution unit does not impose any limits on how much memory a 
task can use: how big variables can get or how many there can be.  
Therefore, there's no way for the server to tell when this is about to 
happen.  (And, Pavel's said previously that there's no easy way to make 
the server impose limits on task size.)

  --Chris                           cunkel@engin.umich.edu
    ResComp Network Support Technician, Bursley Hall
    "Invisibility is in the eye of the beholder."
    Home Page: http://www-personal.engin.umich.edu/~cunkel/



Follow-Ups: References:

Home | Subject Index | Thread Index