Does Qt support shared memory ?
Cause I need to use it.
Does Qt support shared memory ?
Cause I need to use it.
Bee more explicit!
What do you need it for?
I need to use shared memory, and i am using qt, I can not find any information in the assitant or examples shows how to used it.
But actually I remember clearly that once I saw something about the QSharedMemory. I tried to find it in the Assitant but failed...
I don't know what you mean.
For implementing implicitly shared classes you have QSharedData and QSharedPointer.
But you say "shared" memory. Shared by what? Threads?
Regards
"Shared Memory is an efficeint means of passing data between programs. One program will create a memory portion which other processes (if permitted) can access. "
maybe this can help you understand me.
the shared memory segment will be accessed by two applications and thus implement the communication between them.
Oh, you meant shared by processes. I missed that option .
In that case you must be referring to QSharedMemory available in Qt 4.4 . See this link:http://doc.trolltech.com/main-snapsh...redmemory.html.
Anyway, until Qt 4.4 you will have to implement this using platform specific IPC mechanisms( named pipes, sockets, etc).
You can get started with these examples for windows: http://www.codeproject.com/threads/Win32IPC.asp
Also, for linux: http://tldp.org/LDP/lpg/node7.html.
You can find more with google. That's just to get you started.
Regards
You can always use shared memory functions available in the API of your platform. Using Qt doesn't restrict you from using other function calls.
Shawn (8th September 2007)
Yes, you are right.
I've found CreateFileMapping()...
Thanks for your time ~
Hi,
this may sound stupid but is it possible to share the pointer from http://qt.nokia.com/doc/4.6-snapshot...tapointer.html between two different processes.
Regards,
Sriky
Hi guru,
What is the best and easiest way to do that. Currently we are following an approach where we serialize and deserialize data at three levels. I am trying to avoid it. Is QSharedMemory the best solution in terms of performance. when compared to serializationa and deserialization.
It depends what you want to do. QSharedMemory works on byte level, so you will need to serialize and deserialize your data anyway.
Bookmarks