On Oct 4, 2004, at 6:00 AM, Herbert Graf wrote: >> I pretty much doubt it happened because a C compiler stopped >> a program from falling out of main :) >> I dunno what the C compiler ought to do. Starting over is one possibility that makes some sense; as long as its documented pretty clearly, I think it would be OK. The other reasonable thing to do is a tight loop forever. If watchdog is enabled, that would eventually cause a restart as well. If not, it'll just sit there. Just sitting there is more intuitive, perhaps, but it's not clear that it's a better solution. You have no idea whether IO is in a reasonable or safe state at that point. One advantage of restarting is that things might have settled into a state that no longer results in the program running off the end of main. Sitting in one place is NEVER the right thing; one just hopes it is more easily noticed during development. We have this debate internaly rather periodicaly. If a router exhausts its memory, should it crash and reload, or sit there spewing error messages and diagnostics so someone will notice and figure out WHY its broken? The answer isn't obvious, and isn't always the same. If you run out of memory as part simply because there isn't enough (say, you want to fit 100000 routes in memory that will only hold 80000), restarting is not very helpful - you just get to the same point again, and crash again. (OTOH, that would probably be noticed :-) If instead you run out of memory because some coding error results in a slow leak that uses up memory in 2 months, then restarting permits relatively normal operation for another 2 months... BillW _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist