Hi, H. Peter Anvin: > >I thought about doing something like that, but ... > >>However, a much bigger problem is cleanup. > > > >... exactly. > > I thought about this, and probably the sanest way is to wrap malloc() > with something that creates a linked list of allocations. If we abort, > we can unwind the linked list and free all allocations. > There already is a malloc library that does this, plus it can call cleanup for you -- there's more to cleaning up than freeing memory. :-/ Let's see if I can actually find it again. On the other hand, I wonder if the overhead when managing data structures like that really offsets the additional work we'd need to do otherwise, which is simply checking a few more return values. -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de - - BOFH excuse #381: Robotic tape changer mistook operator's tie for a backup tape.