Hi! In the qemu-user case, we allocate various structures and arrays for conversion of data between host and guest byte orders and sizes. But it is actually not necessary to do such allocation when the *size* is the same, and only byte order is different, because the conversion can be done in-place. Does it make any sense to avoid' allocations in such cases?
There are 2 issues with this though. First is that in some cases, the data being converted is const, and we may end up writing to a data resides in a read-only segment, is it ever possible? And second - it is not entirely clear what to do in case the syscall returned error. Thanks, /mjt