On Wed, Oct 29, 2025 at 11:30:10AM +0100, BALATON Zoltan wrote: > > memory_region_new_* will work, but I don't think removing unnecessary > > but harmless fields from a device state structure does not sufficiently > > motivates adding them. > > I haven't given up on this yet, that's why I alternatively proposed > > object_alloc (same as object_new without object_initialize) > memory_region_init > > which is just a small change but should also work without adding > memory_region_new convenience functions. Then only object_alloc needs to be > added.
IMHO if this will ever happen, memory_region_new*() is better, unless object_alloc() can be used anywhere besides MemoryRegion.. It seems to me, MemoryRegion is the only one I'm aware of that may need such tweak, rather than using object_new() directly. -- Peter Xu
