|
Boost Users : |
Subject: Re: [Boost-users] Memory mapped files
From: Simon Giddings (simon.giddings_at_[hidden])
Date: 2019-01-23 08:19:14
We have already taken into account the problem of pointers and also
endian ordering.
When doing a hex dump of the files produced under unix and one produced
under android, using the same data content, we have noticed that there
are byte differences.
So, other than doing a "memory dump", is it possible to get Boost to
serialise the data out to disk ?
On 23/01/2019 01:46, Gavin Lambert via Boost-users wrote:
> On 21/01/2019 22:41, Simon Giddings wrote:
>> We are developing a system which heavily uses memory mapped files.
>> These files are initially created under a unix system, but will then
>> be used in portable systems such as Android and iOS.
>> We are having some problems loading memory mapped files created under
>> Unix into Android.
>
> In what context? Using some Boost library or in general?
>
>> Is this scenario even possible ?
>> Are the memory mapped files compatible between systems ?
>
> They can be, but are not guaranteed to be, depending on what you're
> storing in the memory.
>
> Binary layout of class types is usually not guaranteed cross-platform
> (or cross-compiler, for that matter).
>
> Anything involving pointers usually won't work at all, even
> cross-process or cross-session, let alone cross-platform.
>
> You can also have issues with padding or value endian ordering,
> depending on the specific platforms involved.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
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