Subject: Re: [boost] [interprocess] sharing memory between 32 bit and 64 bit Windows processes
From: Arno Schödl (aschoedl_at_[hidden])
Date: 2011-02-09 03:30:19
> > 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
> > example:
> > template<class PointedType, class DifferenceType=ptrdiff_t> class
> > offset_ptr;
> > 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
> > you?
> 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.
We'd implement it, as long as you are willing to review it and allow it into boost.
-- Dr. Arno Schödl | aschoedl_at_[hidden] Technical Director think-cell Software GmbH | Chausseestr. 8/E | 10115 Berlin | Germany http://www.think-cell.com | phone +49 30 666473-10 | US phone +1 800 891 8091 Amtsgericht Berlin-Charlottenburg, HRB 85229 | European Union VAT Id DE813474306 Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk