views:

50

answers:

2

i have been working on a server and it works with 2 programs i made one is the server and one is the error handler and if the main server fails it restarts it. the 2nd program's main way to handle data is by reading the values from the program(because when i was debugging i was filling in the address's), because writeing the values to a text file would just take too long and also would take up space i really need :| anyway i have about 100,000 values BUT i only need about 100 i need to find ONLY them and if i get the wrong one i'll i might crash it by trying to fix what's "wrong" when nothing is. (sometimes way more but it will not have more then 100k of them by the time i need to know the address's).

i don't need people to tell me how to do someother way to do it, i would really just like to know how to find one value in all of the other ones. and i can't write them to a text file i can only read them from memory because the way i set it up and i don't want to spend 2-3 weeks to recode it.

~edit~ Sorry, if i was not clear.

i need the address of a value in memory(i.e int, bool and etc), so i can find it.

also i really don't want to share anything with 2 program because if one crashs it might take the other with it. if they are shareing and if it crashs and does not restart then my server will be offline intell someone tells me or i do a update :| so a day or two.

if anyone else is confused sorry and just ask and i'll edit.

A: 

You won't be able to find them in memory unless you already know their values.

And if you already know their values, why bother looking them up?

If it'd take you 2-3 weeks to re-code it, you should probably spend those 2-3 weeks rewriting your "server" application so that it's more maintainable.

Anon.
A: 

Sorry, it doesn't work that way. Many "values" (variables) are not stored in memory. Instead, they are stored in CPU registers. This is done because registers are a lot faster. However, they are also scarce, so in a big program like yours they will be reused. At different times, different variables will be mapped to a particular register. As a result, even if you know that localVariable732 is sometimes mapped to the ECX register, you won't know whether the ECX register currently contains the localVariable732 value.

MSalters