I am working on a windows system. I need to create a shared memory for inter process communication to share objects (containing pointers as members). Or some equivalent way for fast transfer of objects from a generator process to a receiver process. the size of the objects are also huge. How do i do that? The porblem is that even if i share the objects I need a way so that the other process gets the access to the locations pointed by the pointers in the objects. And sharing each of those locations for each object is not feasible.
Asked
Active
Viewed 164 times
0
-
1Possible duplicate of [Sharing memory between two processes (C, Windows)](http://stackoverflow.com/questions/1200998/sharing-memory-between-two-processes-c-windows) – CodeCaster Jun 17 '16 at 09:39
-
1Please read [ask] and share your research. Did you try typing your title into your favorite web search engine? – CodeCaster Jun 17 '16 at 09:39
1 Answers
1
It's difficult to say without more details, but I would consider a memory mapped file. How you create the file depends on whether you need to communicate between sessions or not. You would also need a notification mechanism when new data was posted. You could do that with a registered message, but again that's only possible if your processes are in the same session/desktop.
I can't really be more specific without knowing the details of the requirement.

Bob Moore
- 6,788
- 3
- 29
- 42
-
1_"It's difficult to say without more details"_ - then maybe considering not answering unclear questions, but asking for clarification in comments. :) – CodeCaster Jun 17 '16 at 09:41
-
My requirement is to pass objects to another process which will process them.The objects sizes are 250 bytes and there will be large number of packets (45000 packets in one second). I want an efficient way to pass those objects to the other program. – Sayantan Ghosh Jun 17 '16 at 10:22
-