memory: avoid unnecessary object_ref/unref
commit612263cf33062f7441a5d0e3b37c65991fdc3210
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Dec 2015 10:44:25 +0000 (9 11:44 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Dec 2015 16:33:48 +0000 (17 17:33 +0100)
treeb2f6e1e60a93546ac7e96647b67b113b102841fb
parenta676854f3447019c7c4b005ab6aece905fccfddd
memory: avoid unnecessary object_ref/unref

For the common case of DMA into non-hotplugged RAM, it is unnecessary
but expensive to do object_ref/unref.  Add back an owner field to
MemoryRegion, so that these memory regions can skip the reference
counting.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/exec/memory.h
memory.c