|
| From: | Paolo Bonzini |
| Subject: | Re: [Qemu-devel] [PATCH qemu v2 04/13] memory: Move FlatView allocation to a helper |
| Date: | Fri, 15 Sep 2017 11:02:33 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 15/09/2017 10:40, Alexey Kardashevskiy wrote:
> -static void flatview_init(FlatView *view)
> +static FlatView *flatview_alloc(void)
> {
> + FlatView *view;
> +
> + view = g_new0(FlatView, 1);
> view->ref = 1;
> - view->ranges = NULL;
> - view->nr = 0;
> - view->nr_allocated = 0;
> +
> + return view;
> }
Maybe flatview_new for consistency with other functions? Otherwise
definitely a good idea.
Paolo
| [Prev in Thread] | Current Thread | [Next in Thread] |