473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Watch window

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

Dec 26 '05 #1
6 2109
sounak wrote:
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.

Dec 26 '05 #2

"sounak" <so*****@gmail.com> wrote
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.
Dec 26 '05 #3
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.

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

Dec 27 '05 #4

sounak wrote:
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. ;-)

Dec 27 '05 #5
"sounak" <so*****@gmail.com> writes:
> 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.


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


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:".

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Dec 27 '05 #6
Then you should have asked that first:
http://www.catb.org/~esr/faqs/smart-questions.html#goal

Your question is still platform-specific, so I'll just suggest that you
look up libpcap. It's a standard, cross-platform library for capturing
network packets.

Dec 27 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lou | last post by:
how do i view the Watch window. Its not under "View" or "View->Other Windows. What is the Command window for. I want to do like in VB6. I want to type in an objects property to see waht it is...
3
by: Neil | last post by:
Hi, If I have the code line "DateTime d1 = DateTime.Now;" and look at d1 in the watch window, I thought I'd only see the properties of the DateTime object variable d1. However I seem to be...
1
by: KR.KIM | last post by:
Hi! When I compile my code and try to debugging, i met one trouble in watch window. i can't see some buffer values, it looks filled by 0x00(null) in watch window. but,buffer was filled by real...
2
by: Peter Steele | last post by:
Say I have a managed C++ app with some code that looks something like this: void MyMethod() { struct Point { int x, y; }; Point* p = new Point; p.x = 1; p.y = 2;
7
by: Brad | last post by:
When debugging my current web project, in VS2003, I found I had lost the ability to drill down on watch objects in the Watch Window; I could only view the single value specific watch objects. ...
0
by: eBob.com | last post by:
I have an array Dim FileInfo(MaxFiles) As OFI of Structure Structure OFI 'OneFileInfo Dim Displayed As Boolean ... Dim Dirname As String
2
by: Enrique Bustamante | last post by:
Casting arrays that works on watch and command window but not in code. My application is casting arrays in a way it should work. To test if I was doing something invalid, I wrote a test code that...
6
by: Tau | last post by:
look my simple code below(vc8): double ends; ends=8.3; when i debug it, the variable ends cannot be displayed in the watch window. it just said "error: index '0' out of bound for...
8
by: Greg | last post by:
Dear all, I've trouble with debugging a huge programm. I want to look into the properties of an object when I am at a breakpoint. But in the watch window he tell's me that the object is "out of...
15
geolemon
by: geolemon | last post by:
I'm having a seriously Twilight Zone moment: In the code below, I'm building a SQL command into a string variable, declared at the top of my code. Then, I connect to the database and try to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.