Re: Placement into shared memory?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Arturas" == Arturas Moskvinas <arturas.moskvinas@xxxxxxxxx> writes:

    >> What is the current correct approach to instantiating objects
    >> in shared memory so that multiple processes can access the C++
    >> objects?

    Arturas> Why exactly do you want to do this? Maybe it is much
    Arturas> easier to share data not objects. Simply then you must
    Arturas> create an object in each process and for data processing
    Arturas> use shared memory data (of course some locking will be
    Arturas> needed if data will be changed).

    Arturas> Or try using threads, if i'm not wrong, they exist in the
    Arturas> same memory and they will see your object correctly.

For this application, threads do  not make good sense.  One process is
compute  bound and  the other  is I/O  bound.  Separate  processes are
strongly preferable.

Thanks for the reply and thoughts,

Marc

-- 
Marc Ronell, PhD CSE, PE EE



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux