Watch window

S

sounak

What is the most efficient way to get prompted whenever the content of
a memory location has been changed by some other program running the
system.
like my program will intimate me whenever a perticular memory location
content has been modified by any other program or my program itself in
the system ...
thanks in advance
sounak
 
G

Giannis Papadopoulos

sounak said:
What is the most efficient way to get prompted whenever the content of
a memory location has been changed by some other program running the
system.
like my program will intimate me whenever a perticular memory location
content has been modified by any other program or my program itself in
the system ...
thanks in advance
sounak

Cannot be done using ISO C. Ask in a operating system specific group.
 
M

Malcolm

sounak said:
What is the most efficient way to get prompted whenever the content of
a memory location has been changed by some other program running the
system.
like my program will intimate me whenever a perticular memory location
content has been modified by any other program or my program itself in
the system ...
thanks in advance
sounak
Most modern processors have a "virtual memory system". This means that the
address in a C pointer need not be the same as the physical pulses which are
used to access the memory chip.
So the most efficient solution is to insert a layer between translation of
virtual to physical address, capturing the locations you want. Unfortunately
there is no easy way of doing this, and certainly no way in standard C.
 
S

sounak

So the most efficient solution is to insert a layer between translation of
virtual to physical address, capturing the locations you want. Unfortunately
there is no easy way of doing this, and certainly no way in standard C.

i could have definetly used mailboxes or shared memory to inform my
program but the main problem is that i could not change the code of the
other program who may be changing in the memory location ..
the actual need for this program i will define you properly :
The program which i actually want to design is that
my program will be capable of getting all the information about the
printing activities performed by different machines in the print server


i have designed that my program will sit in the printing port like
512 of the print server .
but it will be inefficient to run a infinite loop to know that any
packets have arrived or not
So it want to have some technique so that my program will automatically

be notified whenever a packects comes into that port ...


now
i was thinking that if somehow i am able to know that the packet has
reached the ports then my program could initiate
like as you think of interupt.
this could save precious CPU usage due to my continously running
program
 
D

D.Hering

sounak said:
i could have definetly used mailboxes or shared memory to inform my
program but the main problem is that i could not change the code of the
other program who may be changing in the memory location ..
the actual need for this program i will define you properly :
The program which i actually want to design is that
my program will be capable of getting all the information about the
printing activities performed by different machines in the print server


i have designed that my program will sit in the printing port like
512 of the print server .
but it will be inefficient to run a infinite loop to know that any
packets have arrived or not
So it want to have some technique so that my program will automatically

be notified whenever a packects comes into that port ...


now
i was thinking that if somehow i am able to know that the packet has
reached the ports then my program could initiate
like as you think of interupt.
this could save precious CPU usage due to my continously running
program

As mentioned this isn't ANSI C specific. Check the news group for your
operating system. ;-)
 
K

Keith Thompson

sounak said:
i could have definetly used mailboxes or shared memory to inform my
program but the main problem is that i could not change the code of the
other program who may be changing in the memory location ..
the actual need for this program i will define you properly :
The program which i actually want to design is that
my program will be capable of getting all the information about the
printing activities performed by different machines in the print server

There's really no way to do this in standard C, which is what we
discuss in this newsgroup. Try a newsgroup that's specific to
whatever system you're using.

I presume you're using the standard workaround for Google's broken
interface, described at <http://cfaj.freeshell.org/google/>, but
please don't snip the attribution lines, the ones that look like
"Poster Name <e-mail address> writes:".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top