Il 02/06/2013 17:58, Peter Maydell ha scritto: >> > + * memory_region_ref: Add 1 to a memory region's reference count >> > + * >> > + * Whenever memory regions are accessed outside the BQL, they need to be >> > + * preserved against hot-unplug. MemoryRegions actually do not have their >> > + * own reference count; they piggyback on a QOM object, their "owner". >> > + * This function adds a reference to the owner. > It doesn't make much sense to describe the function as > "add 1 to a memory region's reference count" and then > say that memory regions don't have reference counts...
The fact that the reference count is the owner's is really an implementation detail. The reference count is used entirely as if it were the region's. So the summary says it is the region's, the long description says what happens under the hood. Suggestions on rephrasing the comments are welcome. Paolo