Re: [RFC] Cleaning up die() error messages
- From
- H. Peter Anvin <hpa@zytor.com>
- Date
- Oct 12, 2005, 03:18 UTC
- Message-ID
- <434C8095.4080201@zytor.com>
- In-Reply-To
- <pan.2005.10.12.01.20.17.917829@smurf.noris.de>
Matthias Urlichs wrote:
Show 6 quoted lines
> > 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.
-hpa