qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 2/9] virtio-blk: Convert VirtIOBlockReq.elem


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v3 2/9] virtio-blk: Convert VirtIOBlockReq.elem to pointer
Date: Fri, 6 Jun 2014 15:06:47 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Jun 06, 2014 at 09:53:23AM +0800, Fam Zheng wrote:
> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> index 49507ac..388741e 100644
> --- a/hw/block/virtio-blk.c
> +++ b/hw/block/virtio-blk.c
> @@ -27,6 +27,22 @@
>  #endif
>  #include "hw/virtio/virtio-bus.h"
>  
> +static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s)
> +{
> +    VirtIOBlockReq *req = g_malloc0(sizeof(*req));

The virtio-blk.c code used g_malloc() but since we're using
g_slice_new0() for the VirtQueueElement, we might as well use the slice
allocator here too.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]