|
Boost Users : |
Subject: Re: [Boost-users] [Interprocess] Named objects with 'Managed External Buffer' (newbie)
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-04-25 12:41:44
El 25/04/2014 17:13, Jorge Bellon escribió:
> - Would it be possible to use named objects with another data type other
> than CharType and use managed_external_buffer::find to look for them?
> The thing is I could generate a hash or a numerical ID to identify the
> chunk. Generating a string using that number could be done but it would
> not be efficient.
No, named objects are tied to character names.
> Otherwise, I guess I would have to keep a map (or other collection) with
> the <chunk ID, chunk pointer> pairs, define the managed_external_buffer
> with boost::interprocess::null_index (since I won't be using named
> objects) and use it through allocate and deallocate. Is this correct?
Correct. An empty index would not waste much space (an empty intrusive
container) so you could avoid using null_index if you want.
Best,
Ion
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net