Subject: Re: [boost] [interprocess] sharing memory between 32 bit and 64 bit Windows processes
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2011-02-08 16:24:33
El 08/02/2011 17:39, Arno Schödl escribió:
> Hello Ion,
> I think we have a possible solution: Making size_t/ptrdiff_t always
> 64 bit makes the same offset_ptr work fine in both environments, and
> solves similar problems in rb_tree_best_fit as well. We have a
> prototype working.
Nice to hear it.
> Can we template the size_t/ptrdiff_t size into offset_ptr? For
> template<class PointedType, class DifferenceType=ptrdiff_t> class
> Then all other classes could derive their size_types and
> difference_types from their pointer type as unsigned/signed
> std::iterator_traits<pointer_type>::difference_type. Is that ok with
That could be reasonable, but I don't know how much code we'll need to
make dependent on the pointer type. Managed memories are already
dependent on the pointer type, so I guess there is not much impact.
Containers and other types will be harder, in these cases we'll need to
make the allocator's pointer type customizable so that the container
uses the corresponding size_type/difference_type.
I'll add this to my to-do list, but I'm, afraid I have higher priority
issues right now in the library.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk