From: Matthias Urlichs <smurf@smurf.noris.de>
To: "H\. Peter Anvin" <hpa@zytor.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Cleaning up die() error messages
Date: Wed, 12 Oct 2005 08:04:36 +0200 [thread overview]
Message-ID: <20051012060436.GA567@kiste.smurf.noris.de> (raw)
In-Reply-To: <434C8095.4080201@zytor.com>
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
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.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-10-12 6:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-10 10:50 [RFC] Cleaning up die() error messages Elfyn McBratney
2005-10-10 19:04 ` Junio C Hamano
2005-10-11 19:48 ` Matthias Urlichs
2005-10-11 20:50 ` H. Peter Anvin
2005-10-12 1:20 ` Matthias Urlichs
2005-10-12 3:18 ` H. Peter Anvin
2005-10-12 4:25 ` Junio C Hamano
2005-10-12 4:40 ` H. Peter Anvin
2005-10-12 5:02 ` Junio C Hamano
2005-10-12 6:04 ` Matthias Urlichs [this message]
2005-10-10 20:14 ` Daniel Barkalow
2005-10-11 15:02 ` Alex Riesen
2005-10-11 16:11 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051012060436.GA567@kiste.smurf.noris.de \
--to=smurf@smurf.noris.de \
--cc=git@vger.kernel.org \
--cc=hpa@zytor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).