Re: [RFC] Cleaning up die() error messages

From: Matthias Urlichs <smurf@smurf.noris.de>
Date: 2005-10-12 16:04:36
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.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Wed Oct 12 16:06:44 2005

This archive was generated by hypermail 2.1.8 : 2005-10-12 16:06:47 EST