Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: C++
Expertise: All
Apr 24, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Accessing an Object From Another Process

On modern operating systems, a process consists of an executable file that the OS loads into the system's memory and executes. A process normally has an entry point and one or more exit points. The OS allocates a distinct heap, address space, and process id for every running process. An application can have one or more processes running together. For example, a Web browser may invoke an HTML editor and an email client as separate processes. This process model is very similar to a C/C++ program, whereby main() is the entry point and the main thread of execution. It's important to note that given this process model, distinct programs can't access each other's data and code. For example, trying to pass an address of an object from one process to another is likely to cause a runtime crash because the object's address is valid only within its process's address space. To be able to access an object from a different process, you have to use one of the interprocess communication mechanisms supported by your OS, such as shared memory, sockets, and pipes.
Danny Kalev
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date