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.