From: Stefan Hajnoczi <stefanha@gmail.com>
To: Harmandeep Kaur <write.harmandeep@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Riku Voipio <riku.voipio@iki.fi>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v6] linux-user/syscall.c: malloc()/calloc() to g_malloc()/g_try_malloc()/g_new0()
Date: Thu, 8 Oct 2015 10:54:04 +0100 [thread overview]
Message-ID: <20151008095404.GE14090@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <CAPtdW15Ld0jNT7gFNr-P_-4+7uyr=1r=Eqi4ohYSHy0tNgKEfQ@mail.gmail.com>
On Tue, Oct 06, 2015 at 09:47:12PM +0530, Harmandeep Kaur wrote:
> Convert malloc()/ calloc() calls to g_malloc()/ g_try_malloc()/ g_new0()
>
> All heap memory allocation should go through glib so that we can take
> advantage of a single memory allocator and its debugging/tracing features.
>
> Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
> ---
> v1->v2 convert the free() call in host_to_target_semarray()
> to g_free() and calls g_try_malloc(count) instead of
> g_try_malloc(sizeof(count))
>
> v2->v3 used g_try_new() and friends to avoid overflow issues
>
> v3->v4 use g_free for unlock_iovec() and host_to_target_semarray().
>
> v4->v5 one missing malloc() is converted and one converted is fixed.
>
> v5->v6 new improved commit description.
>
> ---
> linux-user/syscall.c | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
next prev parent reply other threads:[~2015-10-08 9:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 16:17 [Qemu-devel] [PATCH v6] linux-user/syscall.c: malloc()/calloc() to g_malloc()/g_try_malloc()/g_new0() Harmandeep Kaur
2015-10-08 9:54 ` Stefan Hajnoczi [this message]
2015-10-12 13:06 ` Riku Voipio
2015-10-12 14:40 ` Harmandeep Kaur
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=20151008095404.GE14090@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=write.harmandeep@gmail.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).