[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 11/16] memory: Add address_space_init_shareable()
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [PATCH 11/16] memory: Add address_space_init_shareable() |
Date: |
Fri, 6 Nov 2015 14:49:56 +0000 |
On 6 November 2015 at 14:29, Edgar E. Iglesias <address@hidden> 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 <address@hidden>
thanks
-- PMM
- Re: [Qemu-arm] [PATCH 09/16] target-arm: Support multiple address spaces in page table walks, (continued)
- Re: [Qemu-arm] [PATCH 09/16] target-arm: Support multiple address spaces in page table walks, Edgar E. Iglesias, 2015/11/06
- Re: [Qemu-arm] [PATCH 09/16] target-arm: Support multiple address spaces in page table walks, Paolo Bonzini, 2015/11/09
- Re: [Qemu-arm] [PATCH 09/16] target-arm: Support multiple address spaces in page table walks, Peter Maydell, 2015/11/09
- Re: [Qemu-arm] [PATCH 09/16] target-arm: Support multiple address spaces in page table walks, Paolo Bonzini, 2015/11/09
- Re: [Qemu-arm] [PATCH 09/16] target-arm: Support multiple address spaces in page table walks, Peter Maydell, 2015/11/09
- Re: [Qemu-arm] [PATCH 09/16] target-arm: Support multiple address spaces in page table walks, Paolo Bonzini, 2015/11/09
- Re: [Qemu-arm] [PATCH 09/16] target-arm: Support multiple address spaces in page table walks, Peter Maydell, 2015/11/09
- Re: [Qemu-arm] [PATCH 09/16] target-arm: Support multiple address spaces in page table walks, Peter Maydell, 2015/11/13
[Qemu-arm] [PATCH 11/16] memory: Add address_space_init_shareable(), Peter Maydell, 2015/11/05
[Qemu-arm] [PATCH 06/16] include/qom/cpu.h: Add new get_phys_page_asidx_debug method, Peter Maydell, 2015/11/05
[Qemu-arm] [PATCH 02/16] exec.c: Allow target CPUs to define multiple AddressSpaces, Peter Maydell, 2015/11/05