On 6 November 2015 at 14:29, Edgar E. Iglesias <edgar.igles...@gmail.com> wrote: > On Thu, Nov 05, 2015 at 06:15:53PM +0000, Peter Maydell wrote:
>> +AddressSpace *address_space_init_shareable(MemoryRegion *root, const char >> *name) >> +{ >> + AddressSpace *as; >> + >> + QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) { >> + if (root == as->root) { >> + as->ref_count++; >> + return as; >> + } >> + } >> + >> + as = g_malloc0(sizeof *as); >> + address_space_init(as, root, name); > > Nit-pick but IIUC, address_space_init does not need AS to be zeroed > so this could be changed to a g_malloc(). I tend to prefer to be conservative about these things, so I use zero-allocation unless I'm really sure it's unnecessary. > either-way: > > Reviewed-by: Edgar E. Iglesias <edgar.igles...@xilinx.com> thanks -- PMM