qemu-s390x
[Top][All Lists]
Advanced

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

Re: [qemu-s390x] [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine


From: Marc-André Lureau
Subject: Re: [qemu-s390x] [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals
Date: Fri, 30 Nov 2018 01:32:34 +0400

Hi

On Thu, Nov 29, 2018 at 8:11 PM Eduardo Habkost <address@hidden> wrote:
>
> On Tue, Nov 27, 2018 at 01:27:49PM +0400, Marc-André Lureau wrote:
> > Similarly to accel properties, move compat properties out of globals
> > registration, and apply the machine compat properties during
> > device_post_init().
> >
> > Signed-off-by: Marc-André Lureau <address@hidden>
> > ---
> [...]
> > @@ -191,7 +190,7 @@ struct MachineClass {
> >      const char *default_machine_opts;
> >      const char *default_boot_order;
> >      const char *default_display;
> > -    GArray *compat_props;
> > +    GPtrArray *compat_props;
>
> What are the advantages/disadvantages of GArray vs GPtrArray vs
> GList here?  Why did you decide to change this from GArray to
> GPtrArray in v4?

GList would be less efficient than an array (extra pointer, memory
allocations/fragmentation/cache etc).

GPtrArray is similar to GArray, it is just specialized for storing void*.



-- 
Marc-André Lureau



reply via email to

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