From: Michael Snyder <msnyder@vmware.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: question, xmalloc and gdbserver?
Date: Wed, 02 Mar 2011 18:31:00 -0000 [thread overview]
Message-ID: <4D6E8D00.5000304@vmware.com> (raw)
In-Reply-To: <201103020940.21789.pedro@codesourcery.com>
Pedro Alves wrote:
> On Tuesday 01 March 2011 23:25:27, Michael Snyder wrote:
>> What's the policy about using malloc vs. xmalloc in gdbserver?
>> I notice both are used, with xmalloc being favored, but there are
>> still quite a few calls to malloc.
>
> I think malloc is used when a failure is not to be considered
> fatal, e.g., when the size of the data is determined by the input.
>
> Doug went through and fixed a bunch a while ago (yearly 2009).
> You should be able to find the discussions around the patches
> in the archives. Basically, if there's no explicit check
> for NULL after malloc, then it's quite likely a new call
> that went in after Doug's fixes.
>
OK, so you're saying that all "legitimate" calls to malloc
will be checked?
next prev parent reply other threads:[~2011-03-02 18:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 23:25 Michael Snyder
2011-03-02 9:40 ` Pedro Alves
2011-03-02 18:31 ` Michael Snyder [this message]
2011-03-02 18:45 ` Pedro Alves
2011-03-02 19:41 ` Michael Snyder
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=4D6E8D00.5000304@vmware.com \
--to=msnyder@vmware.com \
--cc=gdb@sourceware.org \
--cc=pedro@codesourcery.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