Tim Rowledge tim@rowledge.org wrote:
Has anyone ever done any testing to see just how many passes of compacting can be survived? If we checked the actual free space (perhaps the lowSpaceSignal state is better) and refused to give any to the fwdBlock table would we simply be thrashing a bit more, or doomed? Or should I just give up because nobody can be bothered to actually think about how to do things right for a change?
Oh don't stop now! If it does not go into the standard VM then let's make a Does Things Right VM. There are plenty of people who would live dangerously by using a safer dev environment. Err, you know what I mean.
On this particular issue, I have long wondered why the low-space threshold is still unusably low. Fancy tricks aside, it seems like a no brainer to increase this to a few megabytes.
To look to the future a little, we probably should have a second-level debugging approach which puts you in a new morphic project. It is quite possible that the reason you ran out of memory, is still going to be in effect if you stay in the same project. Two errors in a row--of any kind--should dump you into a new morphic project. It's not as nice as debugging in the original project, but sometimes it is the only way to survive. This is a general mechanism that applies to memory problems as well as plenty of others. Consider, e.g., a morph with all its variables set to nil.
While we're on the subject, I'd love to see someone take a shot at the old idea of catching infinite recursions. If the stack gets deep, then pop up a debugger and ask if everything is okay. As I recall, you had some ideas for implementing this in a simple way but it never happened. Recursion is one of the ways that we run out of space, but checking for out-of-space is not the nicest way to handle it.
Overall, I strongly feel that Squeak should be a *safe* language. It's a great property and it is in our roots. Right now, there are a lot of easy ways to accidentally wedge your image.... and many of them have simple solutions should anyone care to spearhead this.
Cheers,
-Lex
vm-dev@lists.squeakfoundation.org