Boost logo

Boost :

Subject: Re: [boost] interprocess with unordered_map
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2012-03-23 18:12:51


El 23/03/2012 12:57, Olaf van der Spek escribió:
> 2012/3/23 Ion Gaztañaga<igaztanaga_at_[hidden]>:
>> El 21/03/2012 22:56, Joel escribió:
>>
>>> Perhaps the interprocess docs can be updated to show how to create a
>>> simple
>>> allocator from the heap for easy creation of these temporary copiers and
>>> how to
>>> cleanly provide the thunking between "normal" equivalent types (e.g.
>>> strings)
>>> and those used in memory regions (basic_string).
>>
>>
>> Interprocess allocators would require changes to support that and I need to
>> think about it, but I definitely think it should ease this task, as it is
>> demanded by users.
>
> There's still no technical reason to require this copy, is there?
> Can't we come up with a solution that avoids this copy?

Without changing the container the copy (either implicit or explicit) is
unavoidable. In those cases, maybe we can avoid a shared memory
allocation (which will be always slower than a heap allocation) for that
copy.

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk