Does wine perform exact same memory allocations than Windows?
emaentra at ngi.it
Wed May 27 10:37:15 CDT 2020
Thanks for replying back and confirming about different memory
This corroborates my thinking and for sure makes the porting of such
companion apps non trivial.
| What you are doing here is very fragile, even going from Windows to
Windows. I realize it is a common thing to do for game mods though if
the game does not provide an API for such modifications.
I'm fully aware of the fragility and the modding community is also
conscious that updates in the the game may 'break' the logic, even on
Windows; in this particular case it's just about reading memory
thankfully (primarily traversing pointers).
| If you are looking up pointers into the game's code in its DLLs and
EXE files they are very similar because the PE file is mmap'ed into the
processes' address space. You have good chances of the absolute
addresses to be identical.
Some addresses are identical, some other are not, but if it's about
following pointers, I think we're good - after all a pointer is a
pointer both in wine and native Windows.
Basically if one can find a valid AoB/base address, and then solely
operate with pointers, then the Windows logic may be ported with just
some trouble but not impossible.
Everything else, agree 100%.
More information about the wine-devel