From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com,
stefanha@gmail.com, qemu-devel@nongnu.org, blauwirbel@gmail.com,
kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH V10 5/7] libqblock type defines
Date: Thu, 22 Nov 2012 09:50:01 +0800 [thread overview]
Message-ID: <50AD84C9.7010309@linux.vnet.ibm.com> (raw)
In-Reply-To: <50AC8B43.40304@redhat.com>
于 2012-11-21 16:05, Paolo Bonzini 写道:
> Il 21/11/2012 04:12, Wenchao Xia ha scritto:
>>>>
>>>> +#define FUNC_FREE(p) g_free((p))
>>>> +#define FUNC_MALLOC(size) g_malloc((size))
>>>> +#define FUNC_CALLOC(nmemb, size) g_malloc0((nmemb)*(size))
>>>> +#define FUNC_STRDUP(p) g_strdup((p))
>>>
>>> Why keep these?
>>
>> This macro make it easy to switch mem related functions if we change
>> our mind in the future.
>
> I don't like it particularly.
>
> If you really want it, keep it, but please use g_malloc0_n for FUNC_CALLOC.
>
> Paolo
>
OK.
--
Best Regards
Wenchao Xia
next prev parent reply other threads:[~2012-11-22 1:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 9:46 [Qemu-devel] [PATCH V10 0/7] libqblock qemu block layer library Wenchao Xia
2012-11-20 9:46 ` [Qemu-devel] [PATCH V10 1/7] Buildsystem fix distclean error for pixman Wenchao Xia
2012-11-21 22:54 ` Peter Maydell
2012-11-22 1:50 ` Wenchao Xia
2012-11-20 9:46 ` [Qemu-devel] [PATCH V10 2/7] Buildsystem clean tests directory clearly Wenchao Xia
2012-11-20 9:46 ` [Qemu-devel] [PATCH V10 3/7] block export function path_has_protocol Wenchao Xia
2012-11-20 9:46 ` [Qemu-devel] [PATCH V10 4/7] libqblock build system Wenchao Xia
2012-11-20 10:26 ` Paolo Bonzini
2012-11-21 3:03 ` Wenchao Xia
2012-11-21 7:56 ` Paolo Bonzini
2012-11-22 1:47 ` Wenchao Xia
2012-11-20 9:46 ` [Qemu-devel] [PATCH V10 5/7] libqblock type defines Wenchao Xia
2012-11-20 10:30 ` Paolo Bonzini
2012-11-21 3:12 ` Wenchao Xia
2012-11-21 8:05 ` Paolo Bonzini
2012-11-22 1:50 ` Wenchao Xia [this message]
2012-11-20 9:46 ` [Qemu-devel] [PATCH V10 6/7] libqblock API Wenchao Xia
2012-11-20 10:41 ` Paolo Bonzini
2012-11-21 3:40 ` Wenchao Xia
2012-11-21 8:04 ` Paolo Bonzini
2012-11-22 1:48 ` Wenchao Xia
2012-11-20 9:46 ` [Qemu-devel] [PATCH V10 7/7] libqblock test example Wenchao Xia
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=50AD84C9.7010309@linux.vnet.ibm.com \
--to=xiawenc@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.