On Tue, 18 Feb 2025 at 16:42, Philippe Mathieu-Daudé <phi...@linaro.org> wrote: > - About { embedded / heap allocated } QOM objects: In C developers > don't want to give away the embedded model, as it offers free > type checks (while heap-alloc must use runtime checks). IIUC with > Rust it is the opposite, you mentioned is simpler to get build time > checks with the heap-alloc version, is that right? (I didn't took > particular notes about it). I'm interested because for declarative > dynamic machines modelling, it is simpler to use the heap to allocate > the objects, and I'd like to promote that more.
Mmm, I vaguely recall a discussion in a QEMU Summit a few years back about this; we've got a mix of embedded-allocation and the (older style) heap-alloc, but we aren't necessarily completely wedded to embedded-allocation and for dynamic machine creation heap-alloc is more natural. -- PMM