Watch window

Discussion in 'C Programming' started by sounak, Dec 26, 2005.

  1. sounak

    sounak Guest

    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
    sounak, Dec 26, 2005
    #1
    1. Advertising

  2. 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.
    Giannis Papadopoulos, Dec 26, 2005
    #2
    1. Advertising

  3. sounak

    Malcolm Guest

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

    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.
    Malcolm, Dec 26, 2005
    #3
  4. sounak

    sounak Guest


    > > 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
    sounak, Dec 27, 2005
    #4
  5. sounak

    D.Hering Guest

    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. ;-)
    D.Hering, Dec 27, 2005
    #5
  6. "sounak" <> 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) <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.
    Keith Thompson, Dec 27, 2005
    #6
  7. sounak

    nickptar Guest

    nickptar, Dec 27, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Manfred Balik

    realazing a watch

    Manfred Balik, Nov 25, 2004, in forum: VHDL
    Replies:
    4
    Views:
    599
    Hal Murray
    Nov 26, 2004
  2. PJ

    Watch Http Request/Responses

    PJ, Aug 16, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,369
    Ken Cox [Microsoft MVP]
    Aug 16, 2003
  3. Brad
    Replies:
    8
    Views:
    385
  4. et

    Add Watch

    et, Nov 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,862
  5. Ashishthaps

    Creating custom Watch window in ASP.Net

    Ashishthaps, Aug 20, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    133
    Ashishthaps
    Aug 20, 2005
Loading...

Share This Page