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

Paul Miller paul at fxtech.com
Thu Apr 15 14:34:22 CEST 2010


On 4/15/2010 12:10 AM, Kustaa Nyholm wrote:
>>
>> 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 ...

Thanks for your input!

Somthing else I'm considering - how about a socket or local socket? Then 
all the communication can happen over one "wire" - App 1 can do its 
local processing when App 2 requests data, and I can shuffle data over 
in whatever size increments I want.



More information about the Qt-interest-old mailing list