retrowin32
retrowin32 copied to clipboard
memory iterator
I realized there is a better API for iterating some pod data in memory, and also that iterating while executing x86 code is unsafe because memory could move out from underneath. I think the only ok thing to do here is copy.
CC @encounter
(The reason the memory can move is if the call_x86 code eventually allocates more memory, then we resize the underlying Vec<>, which invalidates any pointers into it.)
Makes sense to me. Probably the more accurate behavior is to iterate over the address range and read the addr on each iteration (in case call_x86 code modifies the range), but I can't imagine that will ever be an issue.