I basically want to do something like this:
Of course this will not work, because the address there M lives in memory (&M) is probably different on t and t+x.
S* pS1 = new S; //I use my own version of new which puts the S object into my own memory M
S* pS1 = &M;
printf("%d\n", *(pS1->i) ); //prints 5
The solution would be to ask windows for a special range/page of memory which is always on the same address of the virtual process memory.
I think I've seen something like this done on a posix system.
Are there any known solutions for windows?
Thank you in advance!