[Qt-interest] need input on shared memory/communication

Kustaa Nyholm Kustaa.Nyholm at planmeca.com
Thu Apr 15 07:10:29 CEST 2010


> 
> I'm looking into schlepping memory from one process to another use some
> kind of on-demand shared-memory/IPC solution (on Mac OS X):
> 
> App 1 has a large amount of data (100-200MB) available, and LAUNCHES App 2
> 
> App 2 requests certain chunks of the data from App 1, and then later
> sends certain chunks of data back to App 1 - the order and size of the
> chunks of data are defined at runtime and are not constant
> 
> Is this feasible to implement using Qt's shared memory classes and some
> kind of IPC message system?

I don't think so, just yesterday I asked this question on this very list:

http://www.listware.net/201004/qt-interest/46851-qt-interest-qsharedmemory-l
imits-on-mac-os-x.html

> 
> The "dumb" non-IPC way to implement this would be for App 1 to write
> it's large amount of data to a temporary (possibly memory-mapped) file,

What's wrong with that? Works for me like a charm and was trivial to
implement.
 
> I'd like to use a cleaner solution that isn't so wasteful of disk space.

Wasterfull? 200 MB? On a 200 GB drive?


> Also, App 1 can do certain performance-related things on the requested
> data that I would have to move into App 2, and I'd like to avoid that.

So go with memory mapped files..

> 
> Any suggestions? The Qt sample shared memory app doesn't address the IPC
> or large-buffer-size aspects of what I need to do.
> _______________________________________________

mmap ...

just my 2 snt, Kusti





More information about the Qt-interest-old mailing list