On 11/25/2012 12:45 PM, Jan Kiszka wrote: > On 2012-11-25 11:18, Avi Kivity wrote: >> On 11/05/2012 02:37 PM, Jan Kiszka wrote: >>>> >>>> As I noted, init and destroy cannot cause a topology update. >>> >>> Ah, right. Why are we wrapping them in transaction_begin/commit at all then? >>> >> >> We aren't. >> >> >> void memory_region_destroy(MemoryRegion *mr) >> { >> assert(QTAILQ_EMPTY(&mr->subregions)); >> assert(memory_region_transaction_depth == 0); >> > > We were talking about address_space_init/destroy.
This is to force a re-rendering of the address space, so that listeners see the construction/destruction. Simply assigning as->root wouldn't do that. This kind of reliance on side effects should be documented with a comment (and forbidden to anything that is outside the implementation). My bad. -- error compiling committee.c: too many arguments to function