This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to accesing other process's recourses


On Thu, 15 Oct 2009, Brian McGrew wrote:

d3d1 wrote:
Hi All,

If 2 programs running at same time, is it possible one of those applications
access the other's recourses such as memory data?

On Windows, yes. Look at the ReadProcessMemory / WriteProcessMemory APIs. This is not a GCC question, however.
-----

If there's a way to do this on Linux using gcc-4.1.1 and kernel-2.6.23++ I
would love to hear it!  Persaonlly, I know it's not a gcc question, but
you's guys are the guru's and it would help me out tremendously!!!

If you have control over where the data are located in memory, you can use mmap to map the same file into both address spaces and place the data there. Of course, you'll need to be careful about concurrent access if the data are updated.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]