qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QO


From: Markus Armbruster
Subject: Re: [Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QOM
Date: Thu, 26 Jan 2012 20:57:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Peter Maydell <address@hidden> writes:

> On 26 January 2012 19:00, Anthony Liguori <address@hidden> wrote:
>> We need to modeled MemoryRegions and qemu_irq in QOM too.
>
> +1 : this ought to let us get rid of SysBus...
>
>>  MemoryRegions
>> shouldn't be that difficult.  Our habit of passing qemu_irq's as arrays 
>> without
>> an explicit size will probably require some refactoring but in principle,
>> supporting irqs should be easy too.
>
> I think that there are probably a lot of cases where we're using an array
> of qemu_irqs now but should be using separately named signals of some sort
> instead (particularly where we're using them for things which aren't actually
> IRQs...)

Apropos array of qemu_irq: we're leaking them in several places.
qemu_allocate_irqs() returns a pointer to an array of qemu_irq whose
elements to point into an array of *qemu_irq.  Both arrays are malloced.
    
Many callers ask for just one IRQ like this:
    
    *qemu_allocate_irqs(..., 1)

This leaks the array of qemu_irq.

There are other, less obvious leaks of the returned array.



reply via email to

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