Re: How to share vector among different processes?

Discussion in 'C++' started by red floyd, Sep 5, 2003.

  1. red floyd

    red floyd Guest

    Zhang Yan wrote:
    > Hi,
    > I have data stored in a vector, and want to share it among different processes.
    > The problem is to share the data maintained by vector<> not the vector itself.
    > Is it necessary to write an allocator to allocate memory from shared memory?
    > sorry for my poor English, thanks in advance
    > Sincerely yours,
    > Zhang Yan
    > Harbin Institute of Technology
    > E-Mail:
    >
    >
    >

    It's OT for c.l.c++, but I believe CUJ had an article recently about custom allocators for
    STL containers in shared memory.

    The reason it's OT is that Standard C++ has no concept of a "Process" or "Shared Memory", so
    any implementation is OS specific.
    red floyd, Sep 5, 2003
    #1
    1. Advertising

  2. red floyd

    Zhang Yan Guest

    could you show me the URL of the article, I didn't find it on www.cuj.com.
    and I just want to know is there any easier solutions than writing an
    allocator.

    BTW:
    I've found an allocator written for shared memeory on sourceforge.net

    "red floyd" <> wrote in message
    news:3o26b.9824$...
    > Zhang Yan wrote:
    > > Hi,
    > > I have data stored in a vector, and want to share it among different

    processes.
    > > The problem is to share the data maintained by vector<> not the vector

    itself.
    > > Is it necessary to write an allocator to allocate memory from shared

    memory?
    > > sorry for my poor English, thanks in advance
    > > Sincerely yours,
    > > Zhang Yan
    > > Harbin Institute of Technology
    > > E-Mail:
    > >
    > >
    > >

    > It's OT for c.l.c++, but I believe CUJ had an article recently about

    custom allocators for
    > STL containers in shared memory.
    >
    > The reason it's OT is that Standard C++ has no concept of a "Process" or

    "Shared Memory", so
    > any implementation is OS specific.
    >
    >
    Zhang Yan, Sep 6, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guadala Harry

    Share SQL DB Among Dozens of Sites

    Guadala Harry, Feb 21, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    310
    Peter Bromberg [C# MVP]
    Feb 21, 2004
  2. MK
    Replies:
    6
    Views:
    679
    noSpAm0000
    May 16, 2005
  3. Replies:
    8
    Views:
    1,890
    Csaba
    Feb 18, 2006
  4. Saraswati lakki
    Replies:
    0
    Views:
    1,287
    Saraswati lakki
    Jan 6, 2012
  5. Axel Boldt
    Replies:
    1
    Views:
    125
    Dan Wilga
    Apr 7, 2004
Loading...

Share This Page