Hi Adam,
I think fuchsia.mem/Data is fine (although it's tricky to use correctly) and we should introduce a VMO entry to the union to replace the Buffer member. Doing this will be a bit difficult as there are many users of fuchsia.mem/Data in the system but could be done in the following way:
- Add a VMO entry to the union, but do not set it anywhere
- Teach all of the codepaths and libraries that consume fuchsia.mem/Data how to consume data from a VMO
- Wait at least one Fuchsia milestone
- Teach codepaths and libraries that produce fuchsia.mem/Data instances to write to the VMO instead of the Buffer
- Wait at least one Fuchsia milestone
- Remove the fuchsia.mem/Buffer entry from the union.
Note that this is only possible because Data is a flexible union. There are also some clones of this type that are structs or non flexible unions that use Buffer - those should migrate to use a flexible type (such as fuchsia.mem/Data) or one that knows about VMOs.
- James